From fb43001ad1c389d7d6598389ebe66f8a950a9d5d Mon Sep 17 00:00:00 2001 From: NateN1222 Date: Sat, 2 Sep 2017 13:19:39 -0500 Subject: Contact founder now generates "mailto:" links --- main_background.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'main_background.js') diff --git a/main_background.js b/main_background.js index 37df5aa..18312ed 100644 --- a/main_background.js +++ b/main_background.js @@ -517,6 +517,14 @@ function get_domain(url){ */ var portFromCS; function connected(p) { + if(p["name"] == "contact_finder"){ + // Send a message back with the relevant settings + function cb(items){ + p.postMessage(items); + } + webex.storage.local.get(cb); + return; + } p.onMessage.addListener(function(m) { /** * Updates the entry of the current URL in storage @@ -580,7 +588,7 @@ function connected(p) { function logTabs(tabs) { if(contact_finder){ console.log("[TABID:"+tab_id+"] Injecting contact finder"); - inject_contact_finder(tabs[0]["id"]); + //inject_contact_finder(tabs[0]["id"]); } if(update){ console.log("%c updating tab "+tabs[0]["id"],"color: red;"); @@ -651,8 +659,8 @@ function change_csp(e) { keywords[j] = keywords[j].replace(/;/g,""); // This is the string that we add to every CSP keywords[j] += " data: blob: 'report-sample'"; - console.log("%c new script-src section:","color:green;") - console.log(keywords[j]+ "; "); + //console.log("%c new script-src section:","color:green;") + //console.log(keywords[j]+ "; "); } } var csp_header = ""; @@ -991,7 +999,7 @@ function test_url_whitelisted(url){ return; } var regex; - for(i in wl){ + for(var i in wl){ var s = wl[i].replace(/\*/g,"\\S*"); s = s.replace(/\./g,"\\."); regex = new RegExp(s, "g"); -- cgit v1.2.3