Fix Times of India (amp-redirect)

This commit is contained in:
magnolia1234 2024-02-24 10:23:36 +01:00
parent d00913b8b3
commit bc5fac1bdd
4 changed files with 7 additions and 6 deletions

View File

@ -36,9 +36,8 @@ var restrictions = {
'lopinion.fr': /^((?!\.lopinion\.fr\/lejournal).)*$/,
'nytimes.com': /^((?!\/(help|myaccount|timesmachine)\.nytimes\.com\/).)*$/,
'nzz.ch': /^((?!\/epaper\.nzz\.ch\/).)*$/,
'science.org': /^((?!\.science\.org\/doi\/).)*$/,
'timesofindia.com': /\.timesofindia\.com($|\/($|toi-plus(\/.+)?|.+\.cms))/,
'quora.com': /^((?!quora\.com\/search\?q=).)*$/,
'science.org': /^((?!\.science\.org\/doi\/).)*$/,
'seekingalpha.com': /\/seekingalpha\.com($|\/($|(amp\/)?(article|news)\/|samw\/))/,
'statista.com': /^((?!\.statista\.com\/study\/).)*$/,
'study.com': /\/study\.com\/.+\/lesson\//,
@ -46,6 +45,7 @@ var restrictions = {
'techinasia.com': /\.techinasia\.com\/.+/,
'thetimes.co.uk': /^((?!epaper\.thetimes\.co\.uk).)*$/,
'timeshighereducation.com': /\.timeshighereducation\.com\/((books|features|news|people)\/|.+((\w)+(\-)+){3,}.+|sites\/default\/files\/)/,
'timesofindia.indiatimes.com': /\/timesofindia\.indiatimes\.com($|\/($|toi-plus(\/.+)?|.+\.cms))/,
'uol.com.br': /^((?!(conta|email|piaui\.folha)\.uol\.com\.br).)*$/,
}

View File

@ -15,6 +15,7 @@ Fix Epoch.org.il (css)
Fix Haaretz Group (disable bot)
Fix Humanite.fr (json)
Fix The Quint (json)
Fix Times of India (amp-redirect)
* v3.5.6.0 (2024-02-18)
Add 3 more Gannett sites

View File

@ -5643,7 +5643,7 @@ else if (matchDomain(timesofindia_domains)) {
overflow.removeAttribute('style');
}
if (!window.location.pathname.includes('/amp_')) {
amp_redirect('div[id^="story-blocker"]', '', url.replace('/timesofindia.indiatimes.com/', '/m.timesofindia.com/').replace('/articleshow/', '/amp_articleshow/'));
amp_redirect('div[id^="story-blocker"]', '', url.replace('/articleshow/', '/amp_articleshow/'));
} else {
let amp_images = document.querySelectorAll('div.inline-image > div.inline-imgecontent > amp-img[src]');
for (let amp_image of amp_images) {
@ -5655,7 +5655,7 @@ else if (matchDomain(timesofindia_domains)) {
alt: amp_image.getAttribute('alt')
});
amp_image.parentNode.replaceChild(elem, amp_image);
}
}
}
}
}

View File

@ -1086,7 +1086,7 @@ var defaultSites = {
"lanuovasardegna.it"
]
},
"Haaretz Group": {
"Haaretz Group (fetch from archive.is)": {
domain: "###_il_haaretz_group",
group: [
"haaretz.co.il",
@ -2663,7 +2663,7 @@ var defaultSites = {
],
allow_cookies: 1,
exception: [{
domain: "timesofindia.com",
domain: "timesofindia.indiatimes.com",
allow_cookies: 1,
useragent: "googlebot"
}