From d29be0e0c7360cc694bb6e37e158d82d178b7b56 Mon Sep 17 00:00:00 2001 From: iorate Date: Thu, 15 Nov 2018 00:27:56 +0900 Subject: [PATCH] Move HTML from options.js to options.html --- options.html | 35 +++++++++++++++++++++++++++++++++++ options.js | 41 ++++------------------------------------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/options.html b/options.html index 0637f99e6..0bfa66cce 100644 --- a/options.html +++ b/options.html @@ -6,6 +6,41 @@ uBlacklist Options +
+
+
+ : *://*.example.com/*
+ : /example\.(net|org)/ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+ () +
+
+
+ + +
+
+
+
+ + +
+
+
+
diff --git a/options.js b/options.js index 71f817eb2..8cdcd1bea 100644 --- a/options.js +++ b/options.js @@ -1,46 +1,13 @@ +for (const element of document.querySelectorAll('[data-i18n]')) { + element.insertAdjacentHTML('beforeend', _(element.dataset.i18n)); +} + (async () => { const { blacklist, timestamp, sync } = await getLocalStorage({ blacklist: '', timestamp: new Date(0).toISOString(), sync: false }); - document.body.insertAdjacentHTML('beforeend', String.raw` -
${_('blacklist')}
-
- ${_('blacklistDescription')}
- ${_('example')}: *://*.example.com/*
- ${_('example')}: /example\.(net|org)/ -
-
-
-
- ${_('importFromPersonalBlocklist')} -
-
${_('importDescription')}
-
-
-
-
-
-
-
- ${_('syncWithGoogleDrive')} (${_('experimental')}) -
-
${_('permitDescription')}
-
- - -
-
-
${_('enableSyncDescription')}
-
- - -
-
-
-
- `); const blacklistTextArea = $('blacklistTextArea'); const importTextArea = $('importTextArea');