From 31669d986098e1a69f810f22eef50c351e87669f Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 16 Jan 2022 15:46:41 +0300 Subject: [PATCH] fix/deduplicate/simplify installer --- edit.html | 38 ----- edit/settings.html | 35 ++++ edit/settings.js | 3 +- install-usercss.html | 112 ++++++------- install-usercss/install-usercss.css | 246 ++++++++++++---------------- install-usercss/install-usercss.js | 96 +++++------ install-usercss/preinit.js | 3 + js/localization.js | 10 ++ js/toolbox.js | 2 +- 9 files changed, 252 insertions(+), 293 deletions(-) create mode 100644 edit/settings.html diff --git a/edit.html b/edit.html index b862d77f..eeb9d5e5 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 @@ -
-