aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@fsf.org>2018-05-03 19:45:39 -0400
committerRuben Rodriguez <ruben@fsf.org>2018-05-03 19:45:39 -0400
commitecd59d3bed9d53542ec31fd3dc0c96b5e7eb1084 (patch)
tree05b45f2f0904034bdda2854f02c42fbbe6edec7d
parent6e31bd9b74f260c050f78b97752bc6a9359c2a69 (diff)
Do not run license_read on whitelisted scripts
-rw-r--r--main_background.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/main_background.js b/main_background.js
index 26167d4..dfdfd18 100644
--- a/main_background.js
+++ b/main_background.js
@@ -933,6 +933,7 @@ function get_script(response,url,tabid,wl,index=-1){
if(unused_data[tabid] === undefined){
unused_data[tabid] = {"url":url,"accepted":[],"blocked":[]};
}
+ var edited;
var tok_index = url.split("/").length;
var scriptname = url.split("/")[tok_index-1];
if(wl == true){
@@ -948,10 +949,11 @@ function get_script(response,url,tabid,wl,index=-1){
} else{
resolve("\n/*\n LibreJS: Script whitelisted by user (From a URL found in comma seperated whitelist)\n*/\n"+response);
}
+ edited = [true,response,"Page is whitelisted in preferences"];
+ }else{
+ edited = license_read(response,scriptname);
}
-
var src_hash = hash(response);
- var edited = license_read(response,scriptname);
var verdict = edited[0];
var popup_res;
var domain = get_domain(url);