From 8a9c64a25ca782d0f1d3d0f378897769d4de9c1f Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Fri, 14 Feb 2020 23:07:50 +0000 Subject: [PATCH] get rid of HtmlWebpackPlugin --- server/test_with_browser.py | 1 + src/background.html | 9 -------- src/js/options_page.js | 2 +- src/manifest.json | 14 +++++++----- src/options.html | 2 +- src/popup.html | 1 + webpack.config.js | 45 ++++++++----------------------------- 7 files changed, 21 insertions(+), 53 deletions(-) delete mode 100644 src/background.html diff --git a/server/test_with_browser.py b/server/test_with_browser.py index 65ea2b2..c060bca 100755 --- a/server/test_with_browser.py +++ b/server/test_with_browser.py @@ -31,6 +31,7 @@ def get_webdriver(): driver.install_addon(str(addon_path), temporary=True) yield driver finally: + # confirm('ready to continue?') driver.close() diff --git a/src/background.html b/src/background.html deleted file mode 100644 index 384a69f..0000000 --- a/src/background.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/js/options_page.js b/src/js/options_page.js index 85ee071..8938ac6 100644 --- a/src/js/options_page.js +++ b/src/js/options_page.js @@ -47,6 +47,7 @@ function refreshPermissionValidation(endpoint: string) { } function restoreOptions() { + getSaveButton().addEventListener('click', saveOptions); get_options(opts => { const ep = opts.endpoint; getEndpoint().value = ep; @@ -74,4 +75,3 @@ function saveOptions() { document.addEventListener('DOMContentLoaded', restoreOptions); -getSaveButton().addEventListener('click', saveOptions); diff --git a/src/manifest.json b/src/manifest.json index e01685d..331c235 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,14 +1,13 @@ { - "icons": { - "128": "unicorn.png" + "name": "", + "version": "", + "background": { + "scripts": ["background.js"], + "persistent": false }, "options_ui": { "page": "options.html" }, - - "background": { - "page": "background.html" - }, "browser_action": { "default_icon": "unicorn.png", "default_popup": "popup.html", @@ -22,5 +21,8 @@ "description": "Capture page, with extra information" } }, + "icons": { + "128": "unicorn.png" + }, "manifest_version": 2 } diff --git a/src/options.html b/src/options.html index 8b12c4b..d669a1a 100644 --- a/src/options.html +++ b/src/options.html @@ -2,7 +2,7 @@ - +