From 43a98c8a0cc8f47462dfc634f91b6e82c98a15c5 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 21 Jan 2022 17:19:48 +0100 Subject: [PATCH] Fix Cairns Post, Code Sports & The Advertiser --- background.js | 4 ++-- changelog.txt | 1 + custom/manifest.json | 2 +- manifest.json | 2 +- sites.js | 12 +++++++++++- sites_updated.json | 22 ++++++++++++++++++++++ 6 files changed, 38 insertions(+), 5 deletions(-) diff --git a/background.js b/background.js index 40e2b61..db6e575 100755 --- a/background.js +++ b/background.js @@ -566,7 +566,7 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) { ["blocking"] ); -// theaustralian.com redirect subscribe to amp +// theaustralian.com, adelaidenow.com.au, cairnspost.com.au redirect subscribe to amp ext_api.webRequest.onBeforeRequest.addListener(function (details) { if (!isSiteEnabled(details) || details.url.includes('/digitalprinteditions')) { return; @@ -574,7 +574,7 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) { var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]).replace('www.', 'amp.'); return { redirectUrl: updatedUrl }; }, -{urls:["*://www.theaustralian.com.au/subscribe/*"], types:["main_frame"]}, +{urls:["*://www.theaustralian.com.au/subscribe/*", "*://www.adelaidenow.com.au/subscribe/*", "*://www.cairnspost.com.au/subscribe/*"], types:["main_frame"]}, ["blocking"] ); diff --git a/changelog.txt b/changelog.txt index 786e4a3..d6b9070 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Post-release Add Huffingtonpost.it Add Outside Fix Asia Times +Fix Cairns Post, Code Sports & The Advertiser Fix Challenges.fr Fix Clarin Fix The New Yorker (update) diff --git a/custom/manifest.json b/custom/manifest.json index b81e6dc..d31aedd 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -39,5 +39,5 @@ "webRequestBlocking", "" ], - "version": "2.5.2.5" + "version": "2.5.2.6" } diff --git a/manifest.json b/manifest.json index 1668146..b004f5b 100755 --- a/manifest.json +++ b/manifest.json @@ -591,5 +591,5 @@ "*://*.wsj.net/*", "*://*.zephr.com/*" ], - "version": "2.5.2.5" + "version": "2.5.2.6" } diff --git a/sites.js b/sites.js index 40f27e5..d485d2b 100755 --- a/sites.js +++ b/sites.js @@ -128,7 +128,17 @@ var defaultSites = { ], allow_cookies: 1, useragent: "googlebot", - block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js/ + block_regex: /(\.com\.au\/remote\/identity\/rampart\/latest\/rampart\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/, + exception: [{ + domain: "adelaidenow.com.au", + allow_cookies: 1, + block_regex: /(\.com\.au\/remote\/identity\/rampart\/latest\/rampart\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/ + }, { + domain: "cairnspost.com.au", + allow_cookies: 1, + block_regex: /(\.com\.au\/remote\/identity\/rampart\/latest\/rampart\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/ + } + ] }, "Australian Community Media (daily)": { domain: "###_au_comm_media", diff --git a/sites_updated.json b/sites_updated.json index 07f79ac..9020c69 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,26 @@ { + "Australia News Corp": { + "domain": "###_au_news_corp", + "group": [ + "adelaidenow.com.au", + "cairnspost.com.au", + "codesports.com.au", + "couriermail.com.au", + "dailytelegraph.com.au", + "geelongadvertiser.com.au", + "goldcoastbulletin.com.au", + "heraldsun.com.au", + "ntnews.com.au", + "theaustralian.com.au", + "thechronicle.com.au", + "themercury.com.au", + "townsvillebulletin.com.au", + "weeklytimesnow.com.au" + ], + "allow_cookies": 1, + "useragent": "googlebot", + "block_regex": "(\\.com\\.au\\/remote\\/identity\\/rampart\\/latest\\/rampart\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|ad)-.+\\.js)" + }, "Clarín": { "domain": "clarin.com", "allow_cookies": 1,