diff --git a/changelog.txt b/changelog.txt index c5df5174..9002bc91 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add BQ Prime (former Bloomberg Quint) +Fix Times of India (no amp) * v2.7.3.0 (2022-06-26) Add Artforum diff --git a/contentScript.js b/contentScript.js index d26f7d68..3e52cb18 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3701,6 +3701,7 @@ else if (matchDomain('timeshighereducation.com')) { } else if (matchDomain(timesofindia_domains)) { + let url = window.location.href; let region_block = document.querySelector('div.plan-popup.active'); if (region_block) { removeDOMElement(region_block); @@ -3734,6 +3735,8 @@ else if (matchDomain(timesofindia_domains)) { } else { let paywall = document.querySelector('div#story-blocker'); let amphtml = document.querySelector('link[rel="amphtml"]'); + if (!amphtml) + amphtml = {href: url.replace('/timesofindia.indiatimes.com/', '/m.timesofindia.com/').replace('/articleshow/', '/amp_articleshow/')}; if (paywall && amphtml) { removeDOMElement(paywall); window.location.href = amphtml.href;