aboutsummaryrefslogtreecommitdiff
path: root/contact_finder.js
diff options
context:
space:
mode:
authorNateN1222 <nathannichols454@gmail.com>2017-08-30 13:57:57 -0500
committerNateN1222 <nathannichols454@gmail.com>2017-08-30 13:57:57 -0500
commit102e411ccfc62fefe6205a2b54f67da64b29f878 (patch)
treea39fe24ec4f69b54f01ef35b80c0436d310ac19d /contact_finder.js
parent31cd377ee12ec4f2364ee0c0ea7c8763f98f927c (diff)
Made the blacklist/whitelist/forget preference buttons in the GUI work
Diffstat (limited to 'contact_finder.js')
-rw-r--r--contact_finder.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/contact_finder.js b/contact_finder.js
index 4c7c74e..f26ef61 100644
--- a/contact_finder.js
+++ b/contact_finder.js
@@ -13,6 +13,8 @@
//Copyright (C) 2011, 2012, 2014 Loic J. Duros
//Copyright (C) 2014, 2015 Nik Nyby
+console.log("contact_finder.js");
+
// email address regexp
var reEmail = /^mailto\:(admin|feedback|webmaster|info|contact|support|comments|team|help)\@[a-z0-9.\-]+\.[a-z]{2,4}$/i;
@@ -107,10 +109,12 @@ function new_debug_button(name_text,callback){
var to_insert = '<div style="opacity: 0.5; font-size: small; z-index: 2147483647; position: fixed; right: 1%; top: 4%;" id="abc123_main_div"></div>';
document.body.insertAdjacentHTML('afterbegin', to_insert);
}
- var button_html = '<input id="abc123_button_' + button_i + '" value="' + name_text +'"type="button"></input><br>';
- document.getElementById("abc123_main_div").insertAdjacentHTML('afterbegin', button_html);
- document.getElementById("abc123_button_"+button_i).addEventListener("click",callback);
- button_i = button_i + 1;
+ if(document.getElementById("abc123_button_"+button_i) === undefined){
+ var button_html = '<input id="abc123_button_' + button_i + '" value="' + name_text +'"type="button"></input><br>';
+ document.getElementById("abc123_main_div").insertAdjacentHTML('afterbegin', button_html);
+ document.getElementById("abc123_button_"+button_i).addEventListener("click",callback);
+ button_i = button_i + 1;
+ }
}
/**
* returns input with all elements not of type string removed