From fde5c2bd0ed764fb02bff73cee0146e2466c7b6e Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Mon, 8 Apr 2024 09:55:31 +0200 Subject: [PATCH] Add Private Media AU --- README.md | 8 +++-- background.js | 2 +- changelog.txt | 1 + contentScript.js | 13 +++++--- custom/manifest.json | 2 +- custom/sites_custom.json | 5 --- manifest.json | 5 ++- sites.js | 22 ++++++++++--- sites_updated.json | 71 +++++++++------------------------------- updates.json | 4 +-- 10 files changed, 56 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index c792850..b97c683 100644 --- a/README.md +++ b/README.md @@ -883,7 +883,6 @@ Grouped in options:\ ##### Australia/New Zealand -[Crikey](https://www.crikey.com.au) - [Forbes Australia](https://www.forbes.com.au) - [Inkl](https://www.inkl.com) - [MacroBusiness](https://www.macrobusiness.com.au) - @@ -932,7 +931,12 @@ Grouped in options:\ *InvestSmart* sites like\ [InvestSmart](https://www.investsmart.com.au) - [Intelligent Investor](https://www.intelligentinvestor.com.au)\ -*[McPherson Media Group](https://www.mmg.com.au/portfolio)* sites (opt-in to custom sites) +*[McPherson Media Group](https://www.mmg.com.au/portfolio)* sites (opt-in to custom sites)\ +*[Private Media](https://www.privatemedia.com.au)* sites like\ +[Crikey](https://www.crikey.com.au) - +[Inc. Australia](https://www.inc-aus.com) - +[Smart Company](https://www.smartcompany.com.au) - +[The Mandarin](https://www.themandarin.com.au) ##### China, Hong Kong & Taiwan [CommonWealth Magazine Taiwan](https://www.cw.com.tw)* - diff --git a/background.js b/background.js index 03b4c8d..c23a524 100644 --- a/background.js +++ b/background.js @@ -541,7 +541,7 @@ ext_api.storage.local.get({ } else { ext_api.management.getSelf(function (result) { if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) { - let new_groups = ['###_ch_ringier', '###_fr_groupe_infopro', '###_pl_ringier', '###_usa_digiday']; + let new_groups = ['###_au_private_media', '###_ch_ringier', '###_fr_groupe_infopro', '###_pl_ringier', '###_usa_digiday']; let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))); if (open_options) ext_api.runtime.openOptionsPage(); diff --git a/changelog.txt b/changelog.txt index 901ad32..e8aeb20 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Add Private Media AU * v3.6.3.0 (2024-04-07) Add Bild.de (fetch from archive.is) diff --git a/contentScript.js b/contentScript.js index 775d9dc..377b111 100644 --- a/contentScript.js +++ b/contentScript.js @@ -381,11 +381,16 @@ if (matchDomain('medium.com') || matchDomain(medium_custom_domains) || (!matchDo }, 1000); } -else if (window.location.hostname.match(/\.(com|net)\.au$/)) {//australia +else if (window.location.hostname.match(/\.(com|net)\.au$/) || matchDomain('inc-aus.com')) {//australia -if (matchDomain('crikey.com.au')) { - let ads = '.advert'; - hideDOMStyle(ads); +if (matchDomain(['crikey.com.au', 'inc-aus.com', 'smartcompany.com.au', 'themandarin.com.au'])) { + if (matchDomain('themandarin.com.au')) { + if (dompurify_loaded) + getJsonUrl('div[data-enterprise-agreement-paywall="true"]', '', 'div.paywall-mandy'); + } else { + let ads = '.advert'; + hideDOMStyle(ads); + } } else if (matchDomain('forbes.com.au')) { diff --git a/custom/manifest.json b/custom/manifest.json index a66608d..4841762 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.6.3.0" + "version": "3.6.3.1" } diff --git a/custom/sites_custom.json b/custom/sites_custom.json index 40d46ee..be52c4d 100644 --- a/custom/sites_custom.json +++ b/custom/sites_custom.json @@ -876,11 +876,6 @@ "domain": "theloadstar.com", "ld_json_url": "div#register_wrapper,div[id$=\"_req_container\"]|article|1|1" }, - "Themandarin.com.au": { - "allow_cookies": 1, - "domain": "themandarin.com.au", - "ld_json_url": "div[data-enterprise-agreement-paywall='true']|div.paywall-mandy" - }, "Themonthly.com.au": { "domain": "themonthly.com.au" }, diff --git a/manifest.json b/manifest.json index cd49431..da04b0d 100644 --- a/manifest.json +++ b/manifest.json @@ -352,6 +352,7 @@ "*://*.ilsole24ore.com/*", "*://*.iltelegrafolivorno.it/*", "*://*.iltirreno.it/*", + "*://*.inc-aus.com/*", "*://*.inc.com/*", "*://*.inc42.com/*", "*://*.independent.co.uk/*", @@ -639,6 +640,7 @@ "*://*.slideshare.net/*", "*://*.sloanreview.mit.edu/*", "*://*.sltrib.com/*", + "*://*.smartcompany.com.au/*", "*://*.smh.com.au/*", "*://*.sn.at/*", "*://*.sofrep.com/*", @@ -720,6 +722,7 @@ "*://*.thejuggernaut.com/*", "*://*.thelampmagazine.com/*", "*://*.thelawyersdaily.ca/*", + "*://*.themandarin.com.au/*", "*://*.themarker.com/*", "*://*.themarket.ch/*", "*://*.themercury.com.au/*", @@ -872,5 +875,5 @@ "*://archive.vn/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.6.3.0" + "version": "3.6.3.1" } diff --git a/sites.js b/sites.js index 15e4108..ddf79ae 100644 --- a/sites.js +++ b/sites.js @@ -488,11 +488,6 @@ var defaultSites = { } ] }, - "Crikey.com.au": { - domain: "crikey.com.au", - block_regex: /\.crickey\.com\.au\/zephr\/feature/, - remove_cookies_select_drop: ["blaize_session"] - }, "Crusoe.com.br": { domain: "crusoe.com.br", allow_cookies: 1, @@ -2025,6 +2020,23 @@ var defaultSites = { domain: "penews.com", useragent: "googlebot" }, + "Private Media AU": { + domain: "###_au_private_media", + group: [ + "crikey.com.au", + "inc-aus.com", + "smartcompany.com.au", + "themandarin.com.au" + ], + block_regex: /\.{domain}\/zephr\/feature/, + remove_cookies_select_drop: ["blaize_session"], + exception: [{ + domain: "themandarin.com.au", + allow_cookies: 1, + cs_dompurify: 1 + } + ] + }, "Profil.at": { domain: "profil.at", allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index 85d00d9..c0df624 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -5,12 +5,6 @@ "block_regex": "\\/steadyhq\\.com", "upd_version": "3.6.1.5" }, - "Bar and Bench": { - "domain": "barandbench.com", - "allow_cookies": 1, - "ld_json": "div[id*='paywall-banner']|div[class^='paywall-story-']", - "upd_version": "3.6.0.5" - }, "Capital.fr": { "domain": "capital.fr", "allow_cookies": 1, @@ -23,39 +17,11 @@ "block_regex": "js\\.pelcro\\.com", "upd_version": "3.6.2.5" }, - "Grupo Clarín": { - "domain": "###_ar_grupo_clarin", - "group": [ - "clarin.com", - "lavoz.com.ar", - "losandes.com.ar" - ], - "allow_cookies": 1, - "block_regex": "\\.clarin\\.com\\/js\\/(meter|zonda-).*\\.js", - "exception": [{ - "domain": "lavoz.com.ar", - "allow_cookies": 1, - "block_regex": "cdn\\.wyleex\\.com\\/lavoz\\/pw\\.min\\.js" - }, { - "domain": "losandes.com.ar", - "allow_cookies": 1, - "block_regex": "cdn\\.lavoz\\.com\\.ar\\/sites\\/.+\\/paywall\\/losandes\\/pw\\.js" - } - ], - "upd_version": "3.6.0.7" - }, - "Haaretz Group": { - "domain": "###_il_haaretz_group", - "group": [ - "haaretz.co.il", - "haaretz.com", - "themarker.com" - ], - "allow_cookies": 1, - "block_regex": "{domain}\\/.+\\/page-.+\\.js", - "cs_dompurify": 1, - "useragent_custom": "Mozilla/5.0 (Java) outbrain", - "upd_version": "3.6.0.4" + "Inc-aus.com": { + "domain": "inc-aus.com", + "block_regex": "\\.inc-aus\\.com\\/zephr\\/feature", + "remove_cookies_select_drop": ["blaize_session"], + "upd_version": "3.6.3.1" }, "L'Humanité": { "domain": "humanite.fr", @@ -94,12 +60,6 @@ "cs_code": "[{\"cond\":\".nzzinteraction\", \"rm_class\":\"nzzinteraction\"}]", "upd_version": "3.6.2.1" }, - "Newslaundry": { - "domain": "newslaundry.com", - "allow_cookies": 1, - "ld_json": "div.FrsvM|div.story-element-text", - "upd_version": "3.6.0.8" - }, "Nordwest Zeitung": { "domain": "nwzonline.de", "allow_cookies": 1, @@ -118,6 +78,12 @@ "block_regex": "(\\.piano\\.io\\/xbuilder\\/experience\\/execute|cdn\\.ampproject\\.org(\\/.+)?\\/v\\d\\/amp-(access|loader)-.+\\.js)", "upd_version": "3.6.2.6" }, + "Smartcompany.com.au": { + "domain": "smartcompany.com.au", + "block_regex": "\\.smartcompany\\.com\\.au\\/zephr\\/feature", + "remove_cookies_select_drop": ["blaize_session"], + "upd_version": "3.6.3.1" + }, "Spektrum.de": { "domain": "spektrum.de", "allow_cookies": 1, @@ -130,18 +96,11 @@ "nofix": 1, "upd_version": "3.6.1.6" }, - "The News Minute": { - "domain": "thenewsminute.com", + "Themandarin.com.au": { + "domain": "themandarin.com.au", "allow_cookies": 1, - "ld_json": "div[id*='paywall-banner']|div[class^='paywall-story-']", - "upd_version": "3.6.0.5" - }, - "The Wall Street Journal": { - "domain": "wsj.com", - "allow_cookies": 1, - "block_regex": "(cdn\\.cxense\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)", - "cs_dompurify": 1, - "upd_version": "3.6.0.6" + "ld_json_url": "div[data-enterprise-agreement-paywall='true']|div.paywall-mandy", + "upd_version": "3.6.3.1" }, "WirtschaftsWoche": { "domain": "wiwo.de", diff --git a/updates.json b/updates.json index 8322777..ff6fbac 100644 --- a/updates.json +++ b/updates.json @@ -2,8 +2,8 @@ "addons": { "magnolia@12.34": { "updates": [ - { "version": "3.6.2.0", - "update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.6.2.0.xpi" } + { "version": "3.6.3.0", + "update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.6.3.0.xpi" } ] } }