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).)*$/, 'lopinion.fr': /^((?!\.lopinion\.fr\/lejournal).)*$/,
'nytimes.com': /^((?!\/(help|myaccount|timesmachine)\.nytimes\.com\/).)*$/, 'nytimes.com': /^((?!\/(help|myaccount|timesmachine)\.nytimes\.com\/).)*$/,
'nzz.ch': /^((?!\/epaper\.nzz\.ch\/).)*$/, 'nzz.ch': /^((?!\/epaper\.nzz\.ch\/).)*$/,
'science.org': /^((?!\.science\.org\/doi\/).)*$/,
'timesofindia.com': /\.timesofindia\.com($|\/($|toi-plus(\/.+)?|.+\.cms))/,
'quora.com': /^((?!quora\.com\/search\?q=).)*$/, 'quora.com': /^((?!quora\.com\/search\?q=).)*$/,
'science.org': /^((?!\.science\.org\/doi\/).)*$/,
'seekingalpha.com': /\/seekingalpha\.com($|\/($|(amp\/)?(article|news)\/|samw\/))/, 'seekingalpha.com': /\/seekingalpha\.com($|\/($|(amp\/)?(article|news)\/|samw\/))/,
'statista.com': /^((?!\.statista\.com\/study\/).)*$/, 'statista.com': /^((?!\.statista\.com\/study\/).)*$/,
'study.com': /\/study\.com\/.+\/lesson\//, 'study.com': /\/study\.com\/.+\/lesson\//,
@ -46,6 +45,7 @@ var restrictions = {
'techinasia.com': /\.techinasia\.com\/.+/, 'techinasia.com': /\.techinasia\.com\/.+/,
'thetimes.co.uk': /^((?!epaper\.thetimes\.co\.uk).)*$/, 'thetimes.co.uk': /^((?!epaper\.thetimes\.co\.uk).)*$/,
'timeshighereducation.com': /\.timeshighereducation\.com\/((books|features|news|people)\/|.+((\w)+(\-)+){3,}.+|sites\/default\/files\/)/, '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).)*$/, '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 Haaretz Group (disable bot)
Fix Humanite.fr (json) Fix Humanite.fr (json)
Fix The Quint (json) Fix The Quint (json)
Fix Times of India (amp-redirect)
* v3.5.6.0 (2024-02-18) * v3.5.6.0 (2024-02-18)
Add 3 more Gannett sites Add 3 more Gannett sites

View File

@ -5643,7 +5643,7 @@ else if (matchDomain(timesofindia_domains)) {
overflow.removeAttribute('style'); overflow.removeAttribute('style');
} }
if (!window.location.pathname.includes('/amp_')) { 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 { } else {
let amp_images = document.querySelectorAll('div.inline-image > div.inline-imgecontent > amp-img[src]'); let amp_images = document.querySelectorAll('div.inline-image > div.inline-imgecontent > amp-img[src]');
for (let amp_image of amp_images) { for (let amp_image of amp_images) {
@ -5655,7 +5655,7 @@ else if (matchDomain(timesofindia_domains)) {
alt: amp_image.getAttribute('alt') alt: amp_image.getAttribute('alt')
}); });
amp_image.parentNode.replaceChild(elem, amp_image); amp_image.parentNode.replaceChild(elem, amp_image);
} }
} }
} }
} }

View File

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