diff --git a/changelog.txt b/changelog.txt index 4efd614..2860b31 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add New York Daily News & The Virginian-Pilot (local USA) Fix-update El Periodico de Catalunya +Fix-update Irish Times (no amp) Grouping Tribune Publishing Company Remove The News-Gazette (local USA) Update options (grouped domains to sites.js) diff --git a/contentScript.js b/contentScript.js index 0d1ff9b..57e556f 100644 --- a/contentScript.js +++ b/contentScript.js @@ -15,7 +15,7 @@ var it_repubblica_domains = ['gelocal.it', 'ilsecoloxix.it', 'lanuovasardegna.it var usa_mcc_domains = ['bnd.com', 'charlotteobserver.com', 'fresnobee.com', 'kansas.com', 'kansascity.com', 'kentucky.com', 'newsobserver.com', 'sacbee.com', 'star-telegram.com', 'thestate.com', 'tri-cityherald.com']; // clean local storage of sites (with an exemption for hold-list) -var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'elmundo.es', 'expansion.com', 'houstonchronicle.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk']; +var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'elmundo.es', 'expansion.com', 'houstonchronicle.com', 'irishtimes.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk']; arr_localstorage_hold = arr_localstorage_hold.concat(de_funke_media_domains, es_grupo_vocento_domains); if (!matchDomain(arr_localstorage_hold)){ window.localStorage.clear(); @@ -1202,10 +1202,13 @@ else if (matchDomain("harpers.org")) { else if (matchDomain("irishtimes.com")) { document.addEventListener('DOMContentLoaded', () => { + let amphtml = document.querySelector('link[rel="amphtml"]'); let stub_article_msg = document.querySelector('div.stub-article-msg'); let url = window.location.href; - if (url.includes('mode=sample') || stub_article_msg) - window.location.href = new URL(url).pathname + '?mode=amp'; + if ((url.includes('mode=sample') || stub_article_msg) && amphtml) + window.location.href = amphtml.href; + let amp_ads = document.querySelectorAll('.amp-ad-container'); + removeDOMElement(...amp_ads); }); } @@ -1460,7 +1463,7 @@ else if (domain = matchDomain(de_madsack_domains)) { let subscr_sections = document.querySelectorAll('section[subscriptions-section="content"]'); for (let subscr_section of subscr_sections) subscr_section.removeAttribute('subscriptions-section'); - let amp_ads = document.querySelectorAll('pdb-ad-container'); + let amp_ads = document.querySelectorAll('.pdb-ad-container'); removeDOMElement(...amp_ads); } } diff --git a/manifest.json b/manifest.json index 9631701..e1f991e 100644 --- a/manifest.json +++ b/manifest.json @@ -477,5 +477,5 @@ "*://*.userzoom.com/*", "*://*.wsj.net/*" ], - "version": "2.0.9.4" + "version": "2.0.9.5" } \ No newline at end of file