From 0705392fb2e59b8df2d4b786f9717cf214ea333a Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 18 Jan 2022 16:39:33 +0300 Subject: [PATCH] fix/deduplicate/simplify installer html/css/js (#1383) --- edit.html | 38 ----- edit/settings.html | 35 ++++ edit/settings.js | 3 +- install-usercss.html | 112 ++++++------- install-usercss/install-usercss.css | 242 +++++++++++----------------- install-usercss/install-usercss.js | 96 +++++------ install-usercss/preinit.js | 3 + js/localization.js | 11 ++ js/toolbox.js | 2 +- 9 files changed, 248 insertions(+), 294 deletions(-) create mode 100644 edit/settings.html diff --git a/edit.html b/edit.html index 84768688..c74a4b66 100644 --- a/edit.html +++ b/edit.html @@ -230,44 +230,6 @@ - - diff --git a/edit/settings.html b/edit/settings.html new file mode 100644 index 00000000..054beece --- /dev/null +++ b/edit/settings.html @@ -0,0 +1,35 @@ +
+
+ +
+
+ + + +
+ + +
+
+ + + +
+
diff --git a/edit/settings.js b/edit/settings.js index 29d0e176..6e6d0b9a 100644 --- a/edit/settings.js +++ b/edit/settings.js @@ -7,9 +7,10 @@ /* exported StyleSettings */ 'use strict'; -function StyleSettings() { +async function StyleSettings() { const AUTOSAVE_DELAY = 500; // same as config-dialog.js const SS_ID = 'styleSettings'; + await t.fetchTemplate('/edit/settings.html', SS_ID); const {style} = editor; const ui = t.template[SS_ID].cloneNode(true); const elAuto = $('[id="config.autosave"]', ui); diff --git a/install-usercss.html b/install-usercss.html index 87f9a9cf..246720c7 100644 --- a/install-usercss.html +++ b/install-usercss.html @@ -11,13 +11,12 @@ - - - + + @@ -25,66 +24,59 @@ -
-