From c10ae0d072ee167f3cb3c03c41bc4b52a080613f Mon Sep 17 00:00:00 2001 From: gamebeaker Date: Sun, 15 Sep 2024 16:18:23 +0200 Subject: [PATCH 1/5] Change HTML text for Libaray import/ export --- plugin/_locales/en/messages.json | 8 ++++++++ plugin/popup.html | 2 ++ 2 files changed, 10 insertions(+) diff --git a/plugin/_locales/en/messages.json b/plugin/_locales/en/messages.json index 77eda05d..5703f931 100644 --- a/plugin/_locales/en/messages.json +++ b/plugin/_locales/en/messages.json @@ -23,6 +23,14 @@ "message": "Clear Library", "description": "Label on button to clear Local Storage" }, + "__MSG_button_Lib_Template_Export_Library__": { + "message": "Export Library", + "description": "Label on button to export Library in json format" + }, + "__MSG_button_Lib_Template_Import_Library__": { + "message": "Import Library", + "description": "Label on button to import Library in json format" + }, "__MSG_button_Lib_Template_Upload_Epub__": { "message": "Upload Epub", "description": "Label on button to Upload Epub in Library" diff --git a/plugin/popup.html b/plugin/popup.html index 865173d3..c3f58968 100644 --- a/plugin/popup.html +++ b/plugin/popup.html @@ -157,6 +157,8 @@

Instructions

Library uses: + + __MSG_label_Lib_Template_Upload_Epub_File_Label__ From e9a58d7bc4cf224b520ed62a4e413a75af579152 Mon Sep 17 00:00:00 2001 From: gamebeaker Date: Sun, 15 Sep 2024 16:34:32 +0200 Subject: [PATCH 2/5] Add export/ import Library --- plugin/js/Library.js | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/plugin/js/Library.js b/plugin/js/Library.js index f5a66dbf..0aa02ae2 100644 --- a/plugin/js/Library.js +++ b/plugin/js/Library.js @@ -271,6 +271,10 @@ class Library { LibTemplateMergeUploadButton = document.getElementById("LibTemplateMergeUploadButton").innerHTML; LibTemplateEditMetadataButton = document.getElementById("LibTemplateEditMetadataButton").innerHTML; LibRenderString += ""; + LibRenderString += ""; + LibRenderString += ""; + LibRenderString += ""; LibRenderString += "
"; LibRenderString += "

"+document.getElementById("LibTemplateUploadEpubFileLabel").innerHTML+"

"; LibRenderString += "