Update contentScript & remove cookies (fixed runs)

merge-requests/10/head
magnolia1234 2 years ago
parent 460022559f
commit 4b226513ec

@ -5,10 +5,7 @@ var manifestData = ext_api.runtime.getManifest();
var ext_name = manifestData.name;
var ext_version = manifestData.version;
const cs_limit_except = ['elespanol.com', 'faz.net', 'globeandmail.com', 'nationalgeographic.com'].concat(de_westfalen_medien_domains);
const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'mediapart.fr', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'spectator.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains);
var currentTabUrl = '';
var csDone = false;
var optin_setcookie = false;
var optin_update = true;
var blocked_referer = false;
@ -238,7 +235,7 @@ function set_rules(sites, sites_updated, sites_custom) {
blockedRegexes[domain] = rule.block_regex;
else {
try {
blockedRegexes[domain] = new RegExp(rule.block_regex.replace(/{domain}/g, domain.replace(/\./g, '\\.').replace(/(^\/|\/$)/g, '')));
blockedRegexes[domain] = new RegExp(rule.block_regex.replace(/{domain}/g, domain.replace(/\./g, '\\.')).replace(/(^\/|\/$)/g, ''));
} catch (e) {
false;
}
@ -247,11 +244,25 @@ function set_rules(sites, sites_updated, sites_custom) {
if (rule.hasOwnProperty('block_regex_general')) {
if (rule.block_regex_general instanceof RegExp)
blockedRegexesGeneral[domain] = {block_regex: rule.block_regex_general};
else {
try {
blockedRegexesGeneral[domain] = new RegExp(rule.block_regex_general.replace(/(^\/|\/$)/g, ''));
} catch (e) {
false;
}
}
blockedRegexesGeneral[domain]['excluded_domains'] = rule.excluded_domains ? rule.excluded_domains : [];
}
if (rule.hasOwnProperty('block_js_inline')) {
if (rule.block_js_inline instanceof RegExp)
blockedJsInline[domain] = rule.block_js_inline;
else {
try {
blockedJsInline[domain] = new RegExp(rule.block_js_inline.replace(/{domain}/g, domain.replace(/\./g, '\\.')).replace(/(^\/|\/$)/g, ''));
} catch (e) {
false;
}
}
}
if (rule.useragent) {
switch (rule.useragent) {
@ -313,9 +324,9 @@ function set_rules(sites, sites_updated, sites_custom) {
}
blockedRegexesDomains = Object.keys(blockedRegexes);
blockedJsInlineDomains = Object.keys(blockedJsInline);
disableJavascriptInline();
use_random_ip = Object.keys(random_ip);
change_headers = use_google_bot.concat(use_bing_bot, use_facebook_referer, use_google_referer, use_twitter_referer, use_random_ip);
disableJavascriptInline();
}
// add grouped sites to en/disabledSites (and exclude sites)
@ -674,55 +685,110 @@ ext_api.webRequest.onHeadersReceived.addListener(function (details) {
},
['blocking', 'responseHeaders']);
function blockJsInlineListener(details) {
let domain = matchUrlDomain(blockedJsInlineDomains, details.url);
let matched = domain && details.url.match(blockedJsInline[domain]);
if (matched && optin_setcookie && ['uol.com.br'].includes(domain))
matched = false;
if (!isSiteEnabled(details) || !matched)
return;
var headers = details.responseHeaders;
headers.push({
'name': 'Content-Security-Policy',
'value': "script-src *;"
});
return {
responseHeaders: headers
};
}
function disableJavascriptInline() {
// block inline script
var block_js_inline = [];
ext_api.webRequest.onHeadersReceived.removeListener(blockJsInlineListener);
var block_js_inline_urls = [];
for (let domain in blockedJsInline)
block_js_inline.push("*://*." + domain + "/*");
if (block_js_inline.length)
ext_api.webRequest.onHeadersReceived.addListener(function (details) {
let domain = matchUrlDomain(blockedJsInlineDomains, details.url);
let matched = domain && details.url.match(blockedJsInline[domain]);
if (matched && optin_setcookie && ['uol.com.br'].includes(domain))
matched = false;
if (!isSiteEnabled(details) || !matched)
return;
var headers = details.responseHeaders;
headers.push({
'name': 'Content-Security-Policy',
'value': "script-src *;"
});
return {
responseHeaders: headers
};
}, {
block_js_inline_urls.push("*://*." + domain + "/*");
if (block_js_inline_urls.length)
ext_api.webRequest.onHeadersReceived.addListener(blockJsInlineListener, {
'types': ['main_frame', 'sub_frame'],
'urls': block_js_inline
'urls': block_js_inline_urls
},
['blocking', 'responseHeaders']);
}
if (typeof browser !== 'object') {
var focus_changed = false;
ext_api.windows.onFocusChanged.addListener((windowId) => {
if (windowId > 0)
focus_changed = true;
});
var focus_changed = false;
ext_api.windows.onFocusChanged.addListener((windowId) => {
if (windowId > 0)
focus_changed = true;
});
}
ext_api.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status === 'complete' && /^http/.test(tab.url) && matchUrlDomain(enabledSites, tab.url)) {
let tab_runs = 5;
for (let n = 0; n < tab_runs; n++) {
let url = tab.url;
let rc_domain = matchUrlDomain(remove_cookies, url);
let rc_domain_enabled = rc_domain && enabledSites.includes(rc_domain);
let lib_file = 'lib/empty.js';
if (matchUrlDomain(dompurify_sites, url))
lib_file = 'lib/purify.min.js';
var bg2csData = {
optin_setcookie: optin_setcookie,
amp_unhide: matchUrlDomain(amp_unhide, url)
};
let amp_redirect_domain = '';
if (amp_redirect_domain = matchUrlDomain(Object.keys(amp_redirect), url))
bg2csData.amp_redirect = amp_redirect[amp_redirect_domain];
let cs_code_domain = '';
if (cs_code_domain = matchUrlDomain(Object.keys(cs_code), url))
bg2csData.cs_code = cs_code[cs_code_domain];
let ld_json_domain = '';
if (ld_json_domain = matchUrlDomain(Object.keys(ld_json), url))
bg2csData.ld_json = ld_json[ld_json_domain];
let ld_google_webcache_domain = '';
if (ld_google_webcache_domain = matchUrlDomain(Object.keys(ld_google_webcache), url))
bg2csData.ld_google_webcache = ld_google_webcache[ld_google_webcache_domain];
setTimeout(function () {
ext_api.tabs.executeScript(tabId, {
code: 'var bg2csData = ' + JSON.stringify(bg2csData) + ';'
}, function () {
ext_api.tabs.executeScript(tabId, {
file: lib_file,
runAt: 'document_start'
}, function () {
ext_api.tabs.executeScript(tabId, {
file: 'contentScript.js',
runAt: 'document_start'
}, function (res) {
if (ext_api.runtime.lastError || res[0]) {
return;
}
})
});
});
if (rc_domain_enabled) {
remove_cookies_fn(rc_domain, true);
}
}, n * 1000 / tab_runs);
}
}
});
setInterval(function () {
let current_date_str = currentDateStr();
if (last_date_str < current_date_str) {
bpc_count_daily_users(current_date_str);
last_date_str = current_date_str;
}
}, 60 * 60 * 1000);
var extraInfoSpec = ['blocking', 'requestHeaders'];
if (ext_api.webRequest.OnBeforeSendHeadersOptions.hasOwnProperty('EXTRA_HEADERS'))
extraInfoSpec.push('extraHeaders');
ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
if (details.type === 'main_frame') {
let current_date_str = currentDateStr();
if (last_date_str < current_date_str) {
bpc_count_daily_users(current_date_str);
last_date_str = current_date_str;
}
}
var requestHeaders = details.requestHeaders;
var header_referer = '';
@ -963,24 +1029,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
});
}
let allow_ext_source = medium_custom_domain;
let bpc_amp_site = false;
if (isSiteEnabled({url: header_referer}) && ['script', 'xmlhttprequest', 'image'].includes(details.type)) {
bpc_amp_site = matchUrlDomain('cdn.ampproject.org', details.url);
allow_ext_source = allow_ext_source || bpc_amp_site ||
(matchUrlDomain('elespanol.com', header_referer) && matchUrlDomain('eestatic.com', details.url)) ||
(matchUrlDomain('elmercurio.com', header_referer) && matchUrlDomain('emol.cl', details.url)) ||
(matchUrlDomain('law360.com', header_referer) && matchUrlDomain('law360news.com', details.url)) ||
(matchUrlDomain('lesechos.fr', header_referer) && matchUrlDomain('lesechos.com', details.url)) ||
(matchUrlDomain('marketwatch.com', header_referer) && matchUrlDomain('wsj.net', details.url)) ||
(matchUrlDomain('nationalgeographic.com', header_referer) && matchUrlDomain('natgeofe.com', details.url)) ||
(matchUrlDomain('usatoday.com', header_referer) && matchUrlDomain('gannett-cdn.com', details.url)) ||
(matchUrlDomain(ca_gcm_domains, header_referer) && matchUrlDomain('gcm.omerlocdn.com', details.url)) ||
(matchUrlDomain(it_gedi_domains, header_referer) && matchUrlDomain(['repstatic.it'], details.url));
}
if (!isSiteEnabled(details) && !allow_ext_source) {
if (!isSiteEnabled(details)) {
return;
}
@ -990,8 +1039,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
return { cancel: true };
}
var tabId = details.tabId;
var useUserAgentMobile = false;
var setReferer = false;
@ -1095,82 +1142,6 @@ if (matchUrlDomain(change_headers, details.url) && !ignore_types.includes(detail
});
}
if (tabId !== -1) {
ext_api.tabs.get(tabId, function (currentTab) {
if (!ext_api.runtime.lastError && currentTab && (isSiteEnabled(currentTab) || medium_custom_domain)) {
if (currentTab.url !== currentTabUrl) {
csDone = false;
currentTabUrl = currentTab.url;
}
if ((!['font', 'stylesheet'].includes(details.type) || matchUrlDomain(cs_limit_except, currentTabUrl)) && !csDone) {
let lib_file = 'lib/empty.js';
if (matchUrlDomain(dompurify_sites, currentTabUrl))
lib_file = 'lib/purify.min.js';
var bg2csData = {
optin_setcookie: optin_setcookie,
amp_unhide: matchUrlDomain(amp_unhide, currentTabUrl)
};
let amp_redirect_domain = '';
if (amp_redirect_domain = matchUrlDomain(Object.keys(amp_redirect), currentTabUrl))
bg2csData.amp_redirect = amp_redirect[amp_redirect_domain];
let cs_code_domain = '';
if (cs_code_domain = matchUrlDomain(Object.keys(cs_code), currentTabUrl))
bg2csData.cs_code = cs_code[cs_code_domain];
let ld_json_domain = '';
if (ld_json_domain = matchUrlDomain(Object.keys(ld_json), currentTabUrl))
bg2csData.ld_json = ld_json[ld_json_domain];
let ld_google_webcache_domain = '';
if (ld_google_webcache_domain = matchUrlDomain(Object.keys(ld_google_webcache), currentTabUrl))
bg2csData.ld_google_webcache = ld_google_webcache[ld_google_webcache_domain];
ext_api.tabs.executeScript(tabId, {
code: 'var bg2csData = ' + JSON.stringify(bg2csData) + ';'
}, function () {
ext_api.tabs.executeScript(tabId, {
file: lib_file,
runAt: 'document_start'
}, function () {
ext_api.tabs.executeScript(tabId, {
file: 'contentScript.js',
runAt: 'document_start'
}, function (res) {
if (ext_api.runtime.lastError || res[0]) {
return;
}
})
});
});
}
}
});
} else { //El Mercurio Regionales, lequipe.fr, arcinfo.ch
ext_api.tabs.query({
active: true,
currentWindow: true
}, function (tabs) {
if (tabs && tabs[0] && tabs[0].url && tabs[0].url.startsWith('http')) {
let currentTab = tabs[0];
if (isSiteEnabled(currentTab)) {
let lib_file = 'lib/empty.js';
if (matchUrlDomain(dompurify_sites, currentTab.url))
lib_file = 'lib/purify.min.js';
ext_api.tabs.executeScript({
file: lib_file,
runAt: 'document_start'
}, function () {
ext_api.tabs.executeScript({
file: 'contentScript.js',
runAt: 'document_start'
}, function (res) {
if (ext_api.runtime.lastError || res[0]) {
return;
}
})
});
}
}
});
}
return { requestHeaders: requestHeaders };
}, {
urls: ['<all_urls>']
@ -1372,19 +1343,6 @@ function remove_cookies_fn(domainVar, exclusions = false) {
})
}
// remove cookies after page load
ext_api.webRequest.onCompleted.addListener(function (details) {
let domain = matchUrlDomain(remove_cookies, details.url);
let types = ['main_frame', 'sub_frame', 'xmlhttprequest', 'other'];
if (['medium.com'].concat(medium_custom_domains).includes(domain))
types = ['main_frame', 'image'];
if (domain && types.includes(details.type) && enabledSites.includes(domain)) {
remove_cookies_fn(domain, true);
}
}, {
urls: ["<all_urls>"]
});
function clear_cookies() {
ext_api.tabs.query({
active: true,
@ -1458,20 +1416,22 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
html = decode_utf8(atob(html));
message.data.selector_source = 'body';
}
let parser = new DOMParser();
let doc = parser.parseFromString(html, 'text/html');
let article_new = doc.querySelector(message.data.selector_source);
if (article_new) {
message.data.html = article_new.outerHTML;
ext_api.tabs.query({
active: true,
currentWindow: true
}, function (tabs) {
if (tabs && tabs[0] && tabs[0].url && tabs[0].url.startsWith('http')) {
ext_api.tabs.sendMessage(sender.tab.id, {msg: "showExtSrc", data: message.data});
}
});
message.data.html = html;
if (typeof DOMParser === 'function') {
let parser = new DOMParser();
let doc = parser.parseFromString(html, 'text/html');
let article_new = doc.querySelector(message.data.selector_source);
if (article_new)
message.data.html = article_new.outerHTML;
}
ext_api.tabs.query({
active: true,
currentWindow: true
}, function (tabs) {
if (tabs && tabs[0] && tabs[0].url && tabs[0].url.startsWith('http')) {
ext_api.tabs.sendMessage(sender.tab.id, {msg: "showExtSrc", data: message.data});
}
});
});
}
}).catch(function (err) {
@ -1494,10 +1454,6 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
chrome_scheme = message.scheme;
focus_changed = false;
}
if (message.csDone) {
csDone = true;
//console.log('msg.csDone: ' + csDone);
}
});
// show the opt-in tab on installation

@ -5,6 +5,7 @@ Post-release
Add Mediapart.fr
Update block general paywall script (fix Zephr-local & config sites.js)
Update block inline script (config sites.js)
Update contentScript & remove cookies (fixed runs)
* v2.9.1.0 (2022-10-30)
Add 4 more NHST Media Group sites

@ -951,10 +951,14 @@ if (matchDomain('iltalehti.fi')) {
}
else if (matchDomain('nyteknik.se')) {
// plus code in contentScript_once.js
let locked_article = document.querySelector('div.locked-article');
if (locked_article)
locked_article.classList.remove('locked-article');
window.setTimeout(function () {
let hidden_images = document.querySelectorAll('img[src=""][data-proxy-image]');
for (let hidden_image of hidden_images)
hidden_image.setAttribute('src', hidden_image.getAttribute('data-proxy-image').replace('_320', '_640'));
}, 2000);
}
else if (matchDomain('suomensotilas.fi')) {
@ -3078,7 +3082,42 @@ else if (matchDomain('infzm.com')) {
}
else if (matchDomain('inkl.com')) {
// plus code in contentScript_once.js
let menu_btn = document.querySelector('div.left-buttons-container button.menu-btn');
if (!menu_btn) {
let article_container = document.querySelector('div.article-content-container');
if (article_container) {
article_container.setAttribute('style', 'overflow: visible; max-height: none;');
let figures = document.querySelectorAll('figure');
for (let figure of figures)
figure.setAttribute('style', 'display:block !important;');
}
let gradient_container = document.querySelector('div.gradient-container');
if (gradient_container)
gradient_container.setAttribute('style', 'height:auto;');
let locked = document.querySelector('div.locked');
if (locked)
locked.classList.remove('locked');
}
let what_is_inkl = document.querySelector('.what-is-inkl-container, .features-panel');
let signup = document.querySelector('.article-signup-container, .locked-sign-up-container');
removeDOMElement(what_is_inkl, signup);
let dismiss_button = document.querySelector('div.dismiss-button-container button.btn');
if (dismiss_button)
dismiss_button.click();
let shared_banner = document.querySelector('div.shared-article-inline-banner');
removeDOMElement(shared_banner);
let dive_deeper_summary_bodies = document.querySelectorAll('div.dive-deeper-container div.summary-body');
if (dive_deeper_summary_bodies) {
for (let summary_body of dive_deeper_summary_bodies) {
if (!summary_body.querySelector('a')) {
let ng_click = summary_body.getAttribute('ng-click').replace("showArticle('", '').replace("')", '');
let weblink = document.createElement('a');
weblink.text = 'open';
weblink.href = 'https://www.inkl.com/news/' + ng_click;
summary_body.appendChild(weblink);
}
}
}
}
else if (matchDomain('ipolitics.ca')) {
@ -3210,19 +3249,30 @@ else if (matchDomain('mid-day.com')) {
}
else if (matchDomain('nationalgeographic.com')) {
// plus code in contentScript_once.js
let url = window.location.href;
let subscribed = document.querySelector('.Article__Content--gated');
let overlay = document.querySelector('.Article__Content__Overlay--gated');
let msg = document.querySelector('div#bpc_archive');
if (subscribed && !msg) {
subscribed.appendChild(archiveLink(url));
subscribed.setAttribute('style', 'overflow: visible !important;');
if (overlay)
overlay.classList.remove('Article__Content__Overlay--gated');
function natgeo_func(node) {
removeDOMElement(node);
let body = document.querySelector('body[class]');
if (body) {
body.removeAttribute('class');
body.removeAttribute('style');
}
}
let ads = document.querySelectorAll('div.ad-slot');
removeDOMElement(...ads);
waitDOMElement('div[id^="fittPortal"]', 'DIV', natgeo_func, false);
csDoneOnce = true;
window.setTimeout(function () {
let url = window.location.href;
let subscribed = document.querySelector('.Article__Content--gated');
let overlay = document.querySelector('.Article__Content__Overlay--gated');
let msg = document.querySelector('div#bpc_archive');
if (subscribed && !msg) {
subscribed.appendChild(archiveLink(url));
subscribed.setAttribute('style', 'overflow: visible !important;');
if (overlay)
overlay.classList.remove('Article__Content__Overlay--gated');
}
let ads = document.querySelectorAll('div.ad-slot');
removeDOMElement(...ads);
}, 1000);
}
else if (matchDomain('nationalreview.com')) {
@ -3239,7 +3289,6 @@ else if (matchDomain('nationalreview.com')) {
}
else if (matchDomain('nautil.us')) {
// plus code in contentScript_once.js
let hidden_images = document.querySelectorAll('img[src^="data:image"][data-src]');
for (let hidden_image of hidden_images)
hidden_image.src = hidden_image.getAttribute('data-src');
@ -3318,7 +3367,13 @@ else if (matchDomain('nytimes.com')) {
}
else if (matchDomain('nzherald.co.nz')) {
// plus code in contentScript_once.js
function nzherald_main() {
if (window.Fusion)
window.Fusion.globalContent.isPremium = false;
}
window.setTimeout(function () {
insert_script(nzherald_main);
}, 100);
let article_content = document.querySelector('.article__content');
if (article_content) {
let premium = document.querySelector('span.ellipsis');
@ -4072,8 +4127,6 @@ else
if ((csDone && (bg2csData !== undefined)) || csDoneOnce) {
addDivBpcDone();
if (csDone && (bg2csData !== undefined) && !bg2csData.amp_unhide)
ext_api.runtime.sendMessage({csDone: true});
}
} // end div_bpc_done

@ -1,86 +1,6 @@
//"use strict";
if (matchDomain('inkl.com')) {
window.setTimeout(function () {
let menu_btn = document.querySelector('div.left-buttons-container button.menu-btn');
if (!menu_btn) {
let article_container = document.querySelector('div.article-content-container');
if (article_container) {
article_container.setAttribute('style', 'overflow: visible; max-height: none;');
let figures = document.querySelectorAll('figure');
for (let figure of figures)
figure.setAttribute('style', 'display:block !important;');
}
let gradient_container = document.querySelector('div.gradient-container');
if (gradient_container)
gradient_container.setAttribute('style', 'height:auto;');
let locked = document.querySelector('div.locked');
if (locked)
locked.classList.remove('locked');
}
let what_is_inkl = document.querySelector('.what-is-inkl-container, .features-panel');
let signup = document.querySelector('.article-signup-container, .locked-sign-up-container');
removeDOMElement(what_is_inkl, signup);
let dismiss_button = document.querySelector('div.dismiss-button-container button.btn');
if (dismiss_button)
dismiss_button.click();
let shared_banner = document.querySelector('div.shared-article-inline-banner');
removeDOMElement(shared_banner);
let dive_deeper_summary_bodies = document.querySelectorAll('div.dive-deeper-container div.summary-body');
if (dive_deeper_summary_bodies) {
for (let summary_body of dive_deeper_summary_bodies) {
if (!summary_body.querySelector('a')) {
let ng_click = summary_body.getAttribute('ng-click').replace("showArticle('", '').replace("')", '');
let weblink = document.createElement('a');
weblink.text = 'open';
weblink.href = 'https://www.inkl.com/news/' + ng_click;
summary_body.appendChild(weblink);
}
}
}
}, 1000);
}
else if (matchDomain('nationalgeographic.com')) {
function natgeo_func(node) {
removeDOMElement(node);
let body = document.querySelector('body[class]');
if (body) {
body.removeAttribute('class');
body.removeAttribute('style');
}
}
waitDOMElement('div[id^="fittPortal"]', 'DIV', natgeo_func, false);
}
else if (matchDomain('nautil.us')) {
let hidden_images = document.querySelectorAll('img[src^="data:image"][data-src]');
for (let hidden_image of hidden_images)
hidden_image.src = hidden_image.getAttribute('data-src');
let empty_video_iframes = document.querySelectorAll('iframe[src="about:blank"][data-litespeed-src]');
for (let empty_video_iframe of empty_video_iframes)
empty_video_iframe.src = empty_video_iframe.getAttribute('data-litespeed-src');
}
else if (matchDomain('nyteknik.se')) {
window.setTimeout(function () {
let hidden_images = document.querySelectorAll('img[src=""][data-proxy-image]');
for (let hidden_image of hidden_images)
hidden_image.setAttribute('src', hidden_image.getAttribute('data-proxy-image').replace('_320', '_640'));
}, 2000);
}
else if (matchDomain('nzherald.co.nz')) {
function nzherald_main() {
if (window.Fusion)
window.Fusion.globalContent.isPremium = false;
}
window.setTimeout(function () {
insert_script(nzherald_main);
}, 100);
}
else if (matchDomain('gitlab.com')) {
if (matchDomain('gitlab.com')) {
window.setTimeout(function () {
let bio = document.querySelector('div.profile-user-bio');
if (bio) {
@ -114,40 +34,3 @@ function matchDomain(domains, hostname) {
domains.some(domain => (hostname === domain || hostname.endsWith('.' + domain)) && (matched_domain = domain));
return matched_domain;
}
function removeDOMElement(...elements) {
for (let element of elements) {
if (element)
element.remove();
}
}
function waitDOMElement(selector, tagName = '', callback, multiple = false) {
new window.MutationObserver(function (mutations) {
for (let mutation of mutations) {
for (let node of mutation.addedNodes) {
if (!tagName || (node.tagName === tagName)) {
if (node.matches(selector)) {
callback(node);
if (!multiple)
this.disconnect();
}
}
}
}
}).observe(document, {
subtree: true,
childList: true
});
}
function insert_script(func, insertAfterDom) {
let bpc_script = document.querySelector('script#bpc_script');
if (!bpc_script) {
let script = document.createElement('script');
script.setAttribute('id', 'bpc_script');
script.appendChild(document.createTextNode('(' + func + ')();'));
let insertAfter = insertAfterDom ? insertAfterDom : (document.body || document.head || document.documentElement);
insertAfter.appendChild(script);
}
}

@ -39,11 +39,6 @@
],
"content_scripts": [{
"matches": [
"*://*.inkl.com/*",
"*://*.nationalgeographic.com/*",
"*://*.nautil.us/*",
"*://*.nyteknik.se/*",
"*://*.nzherald.co.nz/*",
"*://*.gitlab.com/magnolia1234"
],
"run_at": "document_start",
@ -701,7 +696,6 @@
"*://*.bwbx.io/*",
"*://*.cedsdigital.it/*",
"*://*.corriereobjects.it/*",
"*://*.eestatic.com/*",
"*://*.emol.cl/*",
"*://*.ensighten.com/*",
"*://*.flip-pay.com/*",
@ -714,21 +708,17 @@
"*://*.mcclatchy.com/*",
"*://*.mcclatchyinteractive.com/*",
"*://*.medscapestatic.com/*",
"*://*.natgeofe.com/*",
"*://*.ndcmediagroep.nl/*",
"*://*.nyt.com/*",
"*://*.pasedigital.cl/*",
"*://*.postmedia.digital/*",
"*://*.prcdn.co/*",
"*://*.repstatic.it/*",
"*://*.rndtech.de/*",
"*://*.substackcdn.com/*",
"*://*.soy-chile.cl/*",
"*://*.static-chmedia.ch/*",
"*://*.wallkit.net/*",
"*://*.wsj.net/*",
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.9.1.5"
"version": "2.9.1.6"
}

Loading…
Cancel
Save