diff options
author | Wojtek Kosior <koszko@koszko.org> | 2021-11-20 18:29:59 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2021-11-20 18:29:59 +0100 |
commit | 96068ada37bfa1d7e6485551138ba36600664caf (patch) | |
tree | 8c471e2b16a37d3ea83843385ee9c89859313046 /html | |
parent | bd767301579c2253d34f60d4ebc4a647cbee5a53 (diff) | |
download | browser-extension-96068ada37bfa1d7e6485551138ba36600664caf.tar.gz browser-extension-96068ada37bfa1d7e6485551138ba36600664caf.zip |
replace cookies with synchronous XmlHttpRequest as policy smuggling method.
Note: this breaks Mozilla port of Haketilo. Synchronous XmlHttpRequest doesn't work as well there. This will be fixed with dynamically-registered content scripts later.
Diffstat (limited to 'html')
-rw-r--r-- | html/display-panel.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/html/display-panel.js b/html/display-panel.js index c078850..4fe0173 100644 --- a/html/display-panel.js +++ b/html/display-panel.js @@ -229,14 +229,14 @@ function handle_activity_report(message) const [type, data] = message; if (type === "settings") { - let [pattern, settings] = data; + const settings = data; blocked_span.textContent = settings.allow ? "no" : "yes"; - if (pattern) { + if (settings.pattern) { pattern_span.textContent = pattern; const settings_opener = - () => open_in_settings(TYPE_PREFIX.PAGE, pattern); + () => open_in_settings(TYPE_PREFIX.PAGE, settings.pattern); view_pattern_but.classList.remove("hide"); view_pattern_but.addEventListener("click", settings_opener); } else { @@ -244,11 +244,10 @@ function handle_activity_report(message) blocked_span.textContent = blocked_span.textContent + " (default)"; } - const components = settings.components; - if (components) { - payload_span.textContent = nice_name(...components); + if (settings.payload) { + payload_span.textContent = nice_name(...settings.payload); payload_buttons_div.classList.remove("hide"); - const settings_opener = () => open_in_settings(...components); + const settings_opener = () => open_in_settings(...settings.payload); view_payload_but.addEventListener("click", settings_opener); } else { payload_span.textContent = "none"; |