aboutsummaryrefslogtreecommitdiff
path: root/main_background.js
diff options
context:
space:
mode:
authorNateN1222 <nathannichols454@gmail.com>2017-09-02 13:19:39 -0500
committerNateN1222 <nathannichols454@gmail.com>2017-09-02 13:19:39 -0500
commitfb43001ad1c389d7d6598389ebe66f8a950a9d5d (patch)
treeb5dc8db4881733d3f91abedd45bb5d21930263fa /main_background.js
parente615086e3322f9a7eee63cddcf4dc1329d55c55a (diff)
Contact founder now generates "mailto:" links
Diffstat (limited to 'main_background.js')
-rw-r--r--main_background.js16
1 files changed, 12 insertions, 4 deletions
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");