diff --git a/background.js b/background.js index f8f189d..ccf50ed 100644 --- a/background.js +++ b/background.js @@ -1016,9 +1016,9 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { // fix blocked referer if (!header_referer) { if (typeof browser !== 'object') - header_referer = details.initiator; + header_referer = details.initiator ? details.initiator : ''; else - header_referer = details.originUrl; + header_referer = details.originUrl ? details.originUrl : ''; } // remove cookies for sites medium platform (custom domains) @@ -1231,7 +1231,7 @@ if (matchUrlDomain(change_headers, details.url) && (['main_frame', 'sub_frame', if (tabId !== -1) { ext_api.tabs.get(tabId, function (currentTab) { - if ((currentTab && isSiteEnabled(currentTab)) || medium_custom_domain || au_apn_site || au_swm_site) { + if ((currentTab && isSiteEnabled(currentTab) && !(matchUrlDomain('nationalgeographic.com', currentTabUrl) && !header_referer)) || medium_custom_domain || au_apn_site || au_swm_site) { if (currentTab.url !== currentTabUrl) { csDone = false; currentTabUrl = currentTab.url; diff --git a/changelog.txt b/changelog.txt index 90e9b78..a12df5b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Fix National Geographic USA Remove Finance.si (obsolete) Fix blocked referer Update custom sites (set useragent Bingbot) diff --git a/contentScript.js b/contentScript.js index 3e68583..6c24b28 100644 --- a/contentScript.js +++ b/contentScript.js @@ -193,7 +193,7 @@ else { if (par.reference.includes('https://omny.fm/') || par.reference.includes('https://docdro.id/')) { article = article + ''; } else { - article = article + 'Embed: ' + '' + par.reference + ''; + article = article + 'Embed: ' + '' + par.reference.split('?')[0] + ''; console.log('embed: ' + par.reference); } } else if (par.kind === 'unordered-list') { @@ -1247,13 +1247,13 @@ else if (matchDomain(nl_mediahuis_region_domains)) { par_elem = ''; par_key = par[key]; if (key === 'subhead') { - par_elem = document.createElement('strong'); - par_elem.innerText = par_key; + par_html = parser.parseFromString('
' + par_key + '
', 'text/html'); + par_elem = par_html.querySelector('div'); } else if (key === 'twitter' || key === 'instagram') { par_elem = document.createElement('a'); Object.assign(par_elem, { href: par_key, - innerText: par_key, + innerText: par_key.split('?')[0], target: '_blank' }); } else if (key === 'youtube') { @@ -1923,6 +1923,11 @@ else if (matchDomain('historyextra.com')) { removeDOMElement(ad_banner); } +else if (matchDomain(['houstonchronicle.com', 'sfchronicle.com'])) { + let wrapper = document.querySelector('.belowMastheadWrapper'); + removeDOMElement(wrapper); +} + else if (matchDomain('inkl.com')) { document.addEventListener('DOMContentLoaded', () => { let menu_btn = document.querySelector('div.left-buttons-container button.menu-btn'); diff --git a/manifest.json b/manifest.json index 71d689b..89fe119 100644 --- a/manifest.json +++ b/manifest.json @@ -528,5 +528,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.2.6.3" + "version": "2.2.6.4" } \ No newline at end of file