mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 07:57:48 +01:00
Fix Times of India (no amp)
This commit is contained in:
parent
0d63834135
commit
64d0880c3f
2 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
|
||||||
|
|
||||||
Post-release
|
Post-release
|
||||||
Add BQ Prime (former Bloomberg Quint)
|
Add BQ Prime (former Bloomberg Quint)
|
||||||
|
Fix Times of India (no amp)
|
||||||
|
|
||||||
* v2.7.3.0 (2022-06-26)
|
* v2.7.3.0 (2022-06-26)
|
||||||
Add Artforum
|
Add Artforum
|
||||||
|
|
|
@ -3701,6 +3701,7 @@ else if (matchDomain('timeshighereducation.com')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (matchDomain(timesofindia_domains)) {
|
else if (matchDomain(timesofindia_domains)) {
|
||||||
|
let url = window.location.href;
|
||||||
let region_block = document.querySelector('div.plan-popup.active');
|
let region_block = document.querySelector('div.plan-popup.active');
|
||||||
if (region_block) {
|
if (region_block) {
|
||||||
removeDOMElement(region_block);
|
removeDOMElement(region_block);
|
||||||
|
@ -3734,6 +3735,8 @@ else if (matchDomain(timesofindia_domains)) {
|
||||||
} else {
|
} else {
|
||||||
let paywall = document.querySelector('div#story-blocker');
|
let paywall = document.querySelector('div#story-blocker');
|
||||||
let amphtml = document.querySelector('link[rel="amphtml"]');
|
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) {
|
if (paywall && amphtml) {
|
||||||
removeDOMElement(paywall);
|
removeDOMElement(paywall);
|
||||||
window.location.href = amphtml.href;
|
window.location.href = amphtml.href;
|
||||||
|
|
Loading…
Reference in a new issue