From 20c6892732eb36952ebf9314172eb450e631ab21 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Fri, 11 May 2018 14:03:47 -0400 Subject: Check global license and add to popup. Prevent parsing inline scripts if there is a global license. --- main_background.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = []; -- cgit v1.2.3