aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@fsf.org>2018-05-11 14:03:47 -0400
committerRuben Rodriguez <ruben@fsf.org>2018-05-11 14:03:47 -0400
commit20c6892732eb36952ebf9314172eb450e631ab21 (patch)
tree9006746ac35b8564a6e0d9f62659fab4b8f1a5a9
parent0166d8c292987a523f708d95188e81952074a990 (diff)
Check global license and add to popup. Prevent parsing inline scripts if there is a global license.
-rw-r--r--main_background.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/main_background.js b/main_background.js
index a8a0536..b1c482c 100644
--- a/main_background.js
+++ b/main_background.js
@@ -1187,8 +1187,12 @@ function edit_html(html,url,tabid,wl){
break;
}
}
- if(read_metadata(meta_element) || legacy_license_lib.check(first_script_src)){
+ var license = legacy_license_lib.check(first_script_src);
+ if(read_metadata(meta_element) || license != false ){
console.log("Valid license for intrinsic events found");
+ add_popup_entry(tabid,url,{"url":url,"accepted":[url,"Global license for the page: "+license]});
+ // Do not process inline scripts
+ scripts="";
}else{
// Deal with intrinsic events
var has_intrinsic_events = [];