Fix Times of India (no amp)

merge-requests/7/head
magnolia1234 2 years ago
parent 0d63834135
commit 64d0880c3f

@ -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

@ -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;

Loading…
Cancel
Save