From c287355c9e09b7bc2c3471628db86feeb127e820 Mon Sep 17 00:00:00 2001 From: NateN1222 Date: Tue, 1 Aug 2017 15:16:41 -0500 Subject: Added a way to send a message that updates the whitelisted scripts of a given domain from the browser action content script --- html/display_panel/content/main_panel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'html/display_panel') diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js index 44be902..a724c75 100644 --- a/html/display_panel/content/main_panel.js +++ b/html/display_panel/content/main_panel.js @@ -35,6 +35,7 @@ var current_blocked_data; * */ function generate_HTML(blocked_data){ + current_blocked_data = blocked_data; var a = blocked_data; var button_complain = 'Complain to site owner'; @@ -80,7 +81,7 @@ function generate_HTML(blocked_data){ document.getElementById("wl_"+i).addEventListener("click",function(a){ console.log(a.path[0].id + " clicked"); var temp = current_blocked_data["blocked"][parseInt(a.path[0].id.substr(3))]; - console.log(temp); + console.log(temp); myPort.postMessage({"whitelist_script": temp}); }); } -- cgit v1.2.3