aboutsummaryrefslogtreecommitdiff
path: root/html/display_panel
diff options
context:
space:
mode:
authorNateN1222 <nathannichols454@gmail.com>2017-08-14 11:04:14 -0500
committerNateN1222 <nathannichols454@gmail.com>2017-08-14 11:04:14 -0500
commitba627cc4ea011d7bb001389553042f0978d779ec (patch)
treefc58ad3da2c14b32b44181c7c91997d5b4510004 /html/display_panel
parentdb7dc60155b625c3ca30fe56495f41937d69daee (diff)
Fixed display panel bug, imlpemented more parts of eval_test.js
Diffstat (limited to 'html/display_panel')
-rw-r--r--html/display_panel/content/main_panel.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index 3848a2e..c6d2059 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -1,3 +1,6 @@
+//TODO: there is a known bug involving "forget preference" not working correctly.
+
+
/**
*
* Sets global variable "webex" to either "chrome" or "browser" for
@@ -114,6 +117,9 @@ var template = '<tr><td id="c1"></td><td id="c2"></td></tr>';
var lr_flag = true;
var button_num = 0;
function write_button(button,callback){
+ if(document.getElementById("buttons_table").innerHTML.indexOf(button) != -1){
+ return;
+ }
var id = "buttonno_"+button_num;
if(lr_flag){
document.getElementById("buttons_table").insertAdjacentHTML("beforeend",template);
@@ -161,6 +167,8 @@ function generate_HTML(blocked_data){
for(var i = 0; i < to_clr.length; i++){
to_clr[i].innerHTML = "";
}
+ console.log("REGEN HTML:");
+ console.log(blocked_data);
write_elements(blocked_data,"accepted","green");
write_elements(blocked_data,"whitelisted","green");
write_elements(blocked_data,"blocked","red");
@@ -181,8 +189,7 @@ function generate_HTML(blocked_data){
myPort.postMessage({"open_popup_tab": blocked_data});
});
} else{
- write_button(button_new_tab,"l",function(){
- // NOTE: does not
+ write_button(button_new_tab,function(){
myPort.postMessage({"open_popup_tab": blocked_data});
});
}