Fix The Australian (amp)

This commit is contained in:
magnolia1234 2023-01-18 17:34:01 +01:00
parent 0bbf9445b2
commit c311523c1d
5 changed files with 6 additions and 9 deletions

View file

@ -666,11 +666,7 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) {
if (!isSiteEnabled(details) || details.url.includes('/digitalprinteditions') || !(details.url.includes('dest=') && details.url.split('dest=')[1].split('&')[0])) {
return;
}
var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]);
if (!matchUrlDomain('theaustralian.com.au', details.url))
updatedUrl += '?amp';
else
updatedUrl = updatedUrl.replace('www.', 'amp.');
var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]) + '?amp';
return {
redirectUrl: updatedUrl
};

View file

@ -7,6 +7,7 @@ Add DvhN.nl
Fix Fd.nl (search)
Fix Statista (outlook)
Fix StuDocu
Fix The Australian (amp)
Fix TheTimes.co.uk (overlay)
* v3.0.1.0 (2023-01-15)

View file

@ -268,7 +268,7 @@ else {
let figure_stretch = document.querySelectorAll('figure.stretch');
for (let elem of figure_stretch)
elem.classList.remove('stretch');
let amp_ads_sel = 'amp-ad, amp-embed, [id^="ad-mrec-"], .story-ad-container';
let amp_ads_sel = 'amp-ad, amp-embed, [id^="ad-mrec-"], [class*="ad-container"]';
let comments;
if (window.location.hostname.startsWith('amp.')) {
amp_unhide_subscr_section(amp_ads_sel, true, true, '.newscdn.com.au');

View file

@ -723,5 +723,5 @@
"*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.0.1.3"
"version": "3.0.1.4"
}

View file

@ -129,14 +129,14 @@ var defaultSites = {
],
allow_cookies: 1,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/,
useragent: "googlebot",
exception: [{
domain: "codesports.com.au",
allow_cookies: 1,
block_js_inline: /\.codesports\.com\.au\/.+\/news-story\//,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/
}
],
useragent: "googlebot"
]
},
"Australian Community Media (daily)": {
domain: "###_au_comm_media",