Add Haymarket Media Group

Update custom sites (delete default sites)
This commit is contained in:
magnolia1234 2023-11-06 19:48:00 +01:00
parent 3cc6a222db
commit 5c1b3673d5
11 changed files with 61 additions and 46 deletions

View file

@ -466,6 +466,8 @@ Grouped in options:\
[UnHerd](https://unherd.com)
Grouped in options:\
*[Haymarket Media Group](https://haymarket.com/brands)* sites (opt-in to custom sites)\
*[Haymarket Medical Network](https://www.haymarketmedicalnetwork.com)* sites (opt-in to custom sites)\
*[Incisive Media](https://www.incisivemedia.com/brands)* sites (opt-in to custom sites)\
*National World Publishing* sites like (opt-in to custom sites for unlisted)\
[The Scotsman](https://www.scotsman.com) -

View file

@ -3,6 +3,9 @@ Changelog Bypass Paywalls Clean - Firefox
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
Post-release
Add Haymarket Media Group (opt-in to custom sites)
Add Haymarket Medical Network (opt-in to custom sites)
Update custom sites (delete default sites)
* v3.4.1.0 (2023-11-05)
Add Jane's Defence Weekly
@ -308,7 +311,7 @@ Fix Mediahuis Noord (json)
Fix Quora (AI bot crash)
Fix TheTimes.co.uk (overlay)
Fix TownNews sites (encrypted)
Update popup (Google Search Tool)
Update popup (link to Google Search Tool)
* v3.1.9.0 (2023-05-21)
Remove (custom) Substack (fix obsolete)
@ -372,7 +375,7 @@ Fix Berlingske.dk
Fix NYTimes (Googlebot)
Fix Tagesspiegel.de (background; link to Google Search Tool)
Update block general paywall script (Ippen.space)
Update popup (12ft.io)
Update popup (link to 12ft.io)
* v3.1.3.0 (2023-04-10)
Add Haas Mediengruppe (opt-in to custom sites)
@ -538,7 +541,7 @@ Fix National Review (no amp)
Fix The Athletic (error)
Fix Vogue Business
Update custom sites (default block cookies)
Update popup (Google Search Tool)
Update popup (link to Google Search Tool)
* v3.0.0.0 (2023-01-08)
Add Deutscher Fachverlag Mediengruppe (opt-in to custom sites)

View file

@ -41,6 +41,10 @@ window.setTimeout(function () {
group = '###_substack_custom';// no fix
else if (document.querySelector('script[src*="/wp-content/themes/pmgnews/scripts/promedia.js"], form[action^="https://go.promedia.nl/"]'))
group = '###_nl_promedia';
else if (hostname.match(/\.com$/) && document.querySelector('span#hmn-logo > a[href="https://www.haymarketmedicalnetwork.com/about"], footer a[href="https://www.haymarketmediaus.com/haymarket-media-inc-privacy-policy/"]'))
group = '###_uk_haymarket_medical';
else if (matchDomain(['asianinvestor.net', 'campaignindia.in', 'taspo.de']) || (hostname.match(/\.co(m|\.uk)$/) && document.querySelector('footer a[href^="http://www.haymarket.com"]')))
group = '###_uk_haymarket';
else if (matchDomain(['epochtimes-romania.com']) || hostname.match(/\.epochtimes\.(cz|de|fr|jp)/))
group = '###_usa_epochtimes';
else if (hostname.match(/\.(com|net)\.au$/) && !matchDomain(['insideretail.com.au'])) {

View file

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.4.1.0"
"version": "3.4.1.1"
}

View file

@ -232,6 +232,12 @@
"amp_redirect": "div#memberplusModal",
"domain": "farmersjournal.ie"
},
"Finance.si": {
"add_ext_link": "div[id^='hardlock_']|div#article_main",
"add_ext_link_type": "google_search_tool",
"allow_cookies": 1,
"domain": "finance.si"
},
"Finansavisen.no": {
"allow_cookies": 1,
"domain": "finansavisen.no",

View file

@ -808,5 +808,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.4.1.0"
"version": "3.4.1.1"
}

View file

@ -12,7 +12,7 @@
To add a new site, enter an unique title/domain (without www.).<br>
Select options below (<a href="https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean#add-custom-site" target="_blank">see GitLab help</a>); for examples import from GitLab.<br>
Custom sites (new) are enabled automatically in <small><button><a href="options.html" style="text-decoration:none;color:inherit">Options</a></button></small> (cookies will be blocked by default unless you enable allow_cookies).<br>
If you want to use custom sites (for unisted sites) enable it in <small><button><a href="optin/opt-in.html" style="text-decoration:none;color:inherit">Opt-in</a></button></small>
If you want to use custom sites (for unlisted sites) enable it in <small><button><a href="optin/opt-in.html" style="text-decoration:none;color:inherit">Opt-in</a></button></small>
<strong>Custom sites enabled: <span id="custom-enabled"></span></strong><br>
You can also just request host permissions for the custom sites & post-release added sites (below).<br>
If host permission is missing the icon badge will contain a 'C' (or '+C' if you can import the custom site from GitLab; when no fix X).
@ -36,6 +36,7 @@
<span style='float:left;padding-bottom:5px'>
<button id="delete">Delete</button>
<button id="edit">Edit (re-Add)</button>
<button id="delete_default">Delete<br>default (*) sites</button>
<button id="perm_request">Request<br>permissions</button>
<button id="perm_remove">Remove<br>permissions</button><br>
permissions granted (for all in custom list + updated): <strong><span id="perm-custom"></span></strong>

View file

@ -63,7 +63,6 @@ function sort_options() {
var sites_custom_sorted = sortJson(sites_custom);
textareaEl.value = JSON.stringify(sites_custom_sorted);
}
}
// Export custom sites to file
@ -225,6 +224,29 @@ function delete_options() {
});
}
// Delete custom (& default) sites from ext_api.storage
function delete_default_options() {
ext_api.storage.local.get({
sites_custom: {}
}, function (items) {
sites_custom = filterObject(items.sites_custom, function (val, key) {
return !defaultSites_domains.includes(val.domain);
});
ext_api.storage.local.set({
sites_custom: sites_custom
}, function () {
// Update status to let user know custom & default sites were deleted.
var status_delete = document.getElementById('status_delete');
status_delete.textContent = 'Default sites deleted.';
setTimeout(function () {
//status.textContent = '';
renderOptions();
}, 800);
});
});
}
// Edit custom site (copy to add)
function edit_options() {
var selectEl = document.querySelector('#custom_sites select');
@ -474,6 +496,7 @@ document.getElementById('importInput').addEventListener("change", import_options
document.getElementById('import_gitlab').addEventListener('click', import_gitlab_options);
document.getElementById('add').addEventListener('click', add_options);
document.getElementById('delete').addEventListener('click', delete_options);
document.getElementById('delete_default').addEventListener('click', delete_default_options);
document.getElementById('edit').addEventListener('click', edit_options);
if (custom_switch) {
document.getElementById('perm_request').addEventListener('click', request_permissions);

View file

@ -101,6 +101,7 @@ function showArchiveLinks() {
elem.innerText = key;
if (!(matchDomain(['1ft.io', 'clearthis.page', 'google.com', 'googleusercontent.com'], hostname) || hostname.match(/^archive\.\w{2}$/))) {
elem.href = archive_array[key];
elem.title = elem.href;
elem.target = '_blank';
elem_div.appendChild(elem);
archive_id.appendChild(elem_div);

View file

@ -1023,6 +1023,18 @@ var defaultSites = {
block_regex: /cdn\.cxense\.com\//,
remove_cookies_select_drop: ["xbc"]
},
"Haymarket Media Group (opt-in to custom sites)": {
domain: "###_uk_haymarket",
group: [],
useragent: "googlebot"
},
"Haymarket Medical Network (opt-in to custom sites)": {
domain: "###_uk_haymarket_medical",
group: [],
allow_cookies: 1,
remove_cookies: 1,
cs_code: [{"cond":"div#modal-register-popup, div.gating-banner", "rm_elem":1}, {"cond":"div[data-gated]", "rm_attrib":"data-gated"}]
},
"Hearst Communications (newspapers)": {
domain: "###_usa_hearst_comm",
group: [
@ -2829,6 +2841,8 @@ var custom_flex_not = {
"###_de_madsack": ["madsack.de", "madsack-medien-campus.de"],
"###_wp_leaky_paywall": ["dominionpost.com", "heisenbergreport.com", "thewirechina.com"],
"###_uk_axate.io": ["thecricketer.com", "thinkofx.net"],
"###_uk_haymarket": ["gpbusiness.co.uk", "scmagazineuk.com", "thecorporatetreasurer.com"],
"###_uk_haymarket_medical": ["mycme.com"],
"###_usa_hearst_comm": ["sfgate.com"],
"###_usa_mcc": ["mcclatchy.com"],
"###_usa_townnews": ["bloxdigital.com", "townnews.com"],

View file

@ -17,27 +17,6 @@
"domain": "apollo-magazine.com",
"upd_version": "3.3.9.3"
},
"Australia News Corp (when blocked disable Googlebot in BPC-settings)": {
"domain": "###_au_news_corp",
"group": [
"adelaidenow.com.au",
"cairnspost.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,
"block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js",
"upd_version": "3.3.9.5"
},
"Bloomberg": {
"domain": "bloomberg.com",
"allow_cookies": 1,
@ -116,18 +95,6 @@
"add_ext_link_type": "archive.is",
"upd_version": "3.4.0.4"
},
"Le Journal de Montréal": {
"domain": "journaldemontreal.com",
"allow_cookies": 1,
"block_js_inline": "\\.journalde.+\\.com\\/",
"upd_version": "3.3.8.5"
},
"Le Journal de Québec": {
"domain": "journaldequebec.com",
"allow_cookies": 1,
"block_js_inline": "\\.journalde.+\\.com\\/",
"upd_version": "3.3.8.5"
},
"Le Monde (link to archive.is)": {
"domain": "lemonde.fr",
"allow_cookies": 1,
@ -151,12 +118,6 @@
"cs_code": "[{\"cond\":\"p.sz-article-body__paragraph--reduced\", \"rm_class\":\"sz-article-body__paragraph--reduced\"}]",
"upd_version": "3.4.0.5"
},
"The Baffler": {
"domain": "thebaffler.com",
"allow_cookies": 1,
"block_regex": "\\/blink\\.net\\/.+\\/blink-sdk\\.js",
"upd_version": "3.3.8.3"
},
"The Economist": {
"domain": "economist.com",
"allow_cookies": 1,