aboutsummaryrefslogtreecommitdiff
path: root/main_background.js
diff options
context:
space:
mode:
authorNateN1222 <nathannichols454@gmail.com>2017-08-12 12:27:49 -0500
committerNateN1222 <nathannichols454@gmail.com>2017-08-12 12:27:49 -0500
commitab4a4a9c49c25e2703b1fded3272d0a4cfb35838 (patch)
treec1e2e2ffc73fd6f35c1bfad762d96a4754389513 /main_background.js
parentec120cf896aee2c595d957745f9909a506c8036c (diff)
UI improvements, started a file for the JS evaluation
Diffstat (limited to 'main_background.js')
-rw-r--r--main_background.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/main_background.js b/main_background.js
index 0d8fb13..5242348 100644
--- a/main_background.js
+++ b/main_background.js
@@ -230,6 +230,7 @@ function connected(p) {
return;
}
var update = false;
+ var contact_finder = false;
if(m["whitelist"] !== undefined){
set_script(m["whitelist"][0],"whitelist");
update = true;
@@ -250,14 +251,22 @@ function connected(p) {
if(m["printlocalstorage"] !== undefined){
debug_print_local();
}
+ // invoke_contact_finder
+ if(m["invoke_contact_finder"] !== undefined){
+ contact_finder = true;
+ inject_contact_finder();
+ }
// a debug feature (maybe give the user an option to do this?)
if(m["deletelocalstorage"] !== undefined){
debug_delete_local();
}
function logTabs(tabs) {
+ if(contact_finder){
+ console.log("[TABID:"+tab_id+"] Injecting contact finder");
+ inject_contact_finder(tabs[0]["id"]);
+ }
if(update){
-
// TODO: check the Firefox equivalent reserved URL pattern
if(typeof(tabs[0]["url"].match(/chrome\-extension:\/\/.*display-panel\.html/g)) == "object"){
console.log("%c Not updating popup because this is a reserved page","color: red;");