diff options
author | NateN1222 <nathannichols454@gmail.com> | 2017-08-12 15:31:30 -0500 |
---|---|---|
committer | NateN1222 <nathannichols454@gmail.com> | 2017-08-12 15:31:30 -0500 |
commit | db7dc60155b625c3ca30fe56495f41937d69daee (patch) | |
tree | 264b01853281a1651c35926bba559cf975016a95 /main_background.js | |
parent | ab4a4a9c49c25e2703b1fded3272d0a4cfb35838 (diff) |
Started implementing a version of the JS parsing as a content script
Diffstat (limited to 'main_background.js')
-rw-r--r-- | main_background.js | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/main_background.js b/main_background.js index 5242348..1e31d64 100644 --- a/main_background.js +++ b/main_background.js @@ -32,6 +32,14 @@ function set_webex(){ * */ function options_listener(changes, area){ + // The cache must be flushed when settings are changed + // TODO: See if this can be minimized + function flushed(){ + console.log("cache flushed"); + } + var flushingCache = webex.webRequest.handlerBehaviorChanged(flushed); + + console.log("Items updated in area" + area +": "); var changedItems = Object.keys(changes); @@ -323,7 +331,22 @@ function init_addon(){ webex.runtime.onConnect.addListener(connected); webex.storage.onChanged.addListener(options_listener); webex.tabs.onRemoved.addListener(delete_removed_tab_info); - + + /** + * Callback for request traffic. + * + */ + /* + function script_request(details){ + console.log("Request:"+details.type) + //return {redirectUrl: "about:blank"}; + return true; + } + webex.webRequest.onResponseStarted.addListener(script_request,{ + urls:["<all_urls>"] + }); + */ + /**************** some debugging: ***************************/ // Valid input for update_popup var example_input = { @@ -369,7 +392,9 @@ function test_url_whitelisted(url,callback){ webex.storage.local.get(storage_got); } - +/** +* Loads the contact finder on the given tab ID. +*/ function inject_contact_finder(tab_id){ function executed(result) { console.log("[TABID:"+tab_id+"]"+"finished executing contact finder: " + result); |