diff --git a/background.js b/background.js index 923c9af..a7e521f 100644 --- a/background.js +++ b/background.js @@ -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 }; diff --git a/changelog.txt b/changelog.txt index 3489832..872fd5f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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) diff --git a/contentScript.js b/contentScript.js index 9296b7d..4ff8afe 100644 --- a/contentScript.js +++ b/contentScript.js @@ -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'); diff --git a/manifest.json b/manifest.json index 3a3fc41..a66cbe7 100644 --- a/manifest.json +++ b/manifest.json @@ -723,5 +723,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.0.1.3" + "version": "3.0.1.4" } diff --git a/sites.js b/sites.js index cf1f7e0..4029ffe 100644 --- a/sites.js +++ b/sites.js @@ -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",