From 27fe0e55b26d24156cd5bb58ca1bba851cdf644b Mon Sep 17 00:00:00 2001 From: Gaspard Jankowiak Date: Fri, 5 Jun 2026 12:55:40 +0200 Subject: [PATCH] split the content of the viewer to a separate file --- archive-viewer/index.html | 497 +++++++++++++++++++++++++++++++++++++ content.js | 504 +------------------------------------- manifest.json | 1 + 3 files changed, 505 insertions(+), 497 deletions(-) create mode 100644 archive-viewer/index.html diff --git a/archive-viewer/index.html b/archive-viewer/index.html new file mode 100644 index 0000000..aed1b5f --- /dev/null +++ b/archive-viewer/index.html @@ -0,0 +1,497 @@ + + + + + + Applicant archive + + + +
+ +
+
+

Applicant archive

+

Select the ZIP file, then choose a file on the left to preview it here.

+ +
+ +
+
+ + + + diff --git a/content.js b/content.js index f712e3b..1e2b5f2 100644 --- a/content.js +++ b/content.js @@ -219,504 +219,14 @@ function createApplicantsCsv(applicantDetailsList) { return rows.join("\n") } -function createApplicantsIndexHtml() { - return ` - - - - - Applicant archive - - - -
- -
-
-

Applicant archive

-

Select the ZIP file, then choose a file on the left to preview it here.

- -
- -
-
- - - -` + return response.text() } async function getArchiveViewerJsZipSource() { @@ -945,7 +455,7 @@ function rip(event) { zip.file("applicants.csv", createApplicantsCsv(successfulApplicants)) console.log("Creating index.html") - zip.file("index.html", createApplicantsIndexHtml()) + zip.file("index.html", await getArchiveViewerHtmlSource()) console.log("Adding viewer Javascript to archive") zip.file("jszip.min.js", await getArchiveViewerJsZipSource()) diff --git a/manifest.json b/manifest.json index dd98771..d82c48f 100644 --- a/manifest.json +++ b/manifest.json @@ -23,6 +23,7 @@ "web_accessible_resources": [ { "resources": [ + "archive-viewer/index.html", "lib/jszip.js", "lib/jszip.min.js" ],