Add McClatchy DC

This commit is contained in:
magnolia1234 2022-12-28 12:21:06 +01:00
parent fbd89e3dc0
commit 43a1940459
8 changed files with 17 additions and 15 deletions

View file

@ -325,6 +325,7 @@ Grouped in options:\
[Belleville News-Democrat](https://www.bnd.com) - [Belleville News-Democrat](https://www.bnd.com) -
[Fort Worth Star-Telegram](https://www.star-telegram.com) - [Fort Worth Star-Telegram](https://www.star-telegram.com) -
[Lexington Herald-Leader](https://www.kentucky.com) - [Lexington Herald-Leader](https://www.kentucky.com) -
[McClatchy DC](https://www.mcclatchydc.com) -
[Miami Herald](https://www.miamiherald.com) - [Miami Herald](https://www.miamiherald.com) -
[The Charlotte Observer](https://www.charlotteobserver.com) - [The Charlotte Observer](https://www.charlotteobserver.com) -
[The Fresno Bee](https://www.fresnobee.com) - [The Fresno Bee](https://www.fresnobee.com) -

View file

@ -542,7 +542,8 @@ ext_api.storage.onChanged.addListener(function (changes, namespace) {
} }
// Refresh the current tab // Refresh the current tab
refreshCurrentTab(); if (!['ext_version_new'].includes(key))
refreshCurrentTab();
} }
}); });
@ -839,10 +840,13 @@ if (typeof browser !== 'object') {
ext_api.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { ext_api.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
let tab_status = changeInfo.status; let tab_status = changeInfo.status;
if (/^http/.test(tab.url) && ((tab_status && tab_status === 'complete') || (changeInfo.url))) { if (/^http/.test(tab.url) && ((tab_status && tab_status === 'complete') || (changeInfo.url))) {
let timeout = changeInfo.url ? 500 : 0;
setTimeout(function () {
if (matchUrlDomain(enabledSites, tab.url)) { if (matchUrlDomain(enabledSites, tab.url)) {
runOnTab(tab); runOnTab(tab);
} }
runOnTab_once(tab); runOnTab_once(tab);
}, timeout);
} }
}); });

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox Changelog Bypass Paywalls Clean - Firefox
Post-release Post-release
Add McClatchy DC
* v2.9.9.0 (2022-12-27) * v2.9.9.0 (2022-12-27)
Add Bulletin of the Atomic Scientists Add Bulletin of the Atomic Scientists

View file

@ -35,7 +35,7 @@ var usa_craincomm_domains = ['adage.com', 'autonews.com', 'chicagobusiness.com',
var usa_genomeweb_domains = ['360dx.com', 'genomeweb.com', 'precisiononcologynews.com']; var usa_genomeweb_domains = ['360dx.com', 'genomeweb.com', 'precisiononcologynews.com'];
var usa_hearst_comm_domains = ['expressnews.com', 'houstonchronicle.com', 'sfchronicle.com']; var usa_hearst_comm_domains = ['expressnews.com', 'houstonchronicle.com', 'sfchronicle.com'];
var usa_lee_ent_domains = ['buffalonews.com', 'journalnow.com', 'omaha.com', 'richmond.com', 'tucson.com', 'tulsaworld.com']; var usa_lee_ent_domains = ['buffalonews.com', 'journalnow.com', 'omaha.com', 'richmond.com', 'tucson.com', 'tulsaworld.com'];
var usa_mcc_domains = ['bnd.com', 'charlotteobserver.com', 'fresnobee.com', 'kansas.com', 'kansascity.com', 'kentucky.com', 'miamiherald.com', 'newsobserver.com', 'sacbee.com', 'star-telegram.com', 'thestate.com', 'tri-cityherald.com']; var usa_mcc_domains = ['bnd.com', 'charlotteobserver.com', 'fresnobee.com', 'kansas.com', 'kansascity.com', 'kentucky.com', 'mcclatchydc.com', 'miamiherald.com', 'newsobserver.com', 'sacbee.com', 'star-telegram.com', 'thestate.com', 'tri-cityherald.com'];
var usa_mng_domains = ['denverpost.com', 'eastbaytimes.com', 'mercurynews.com', 'ocregister.com', 'pe.com', 'twincities.com']; var usa_mng_domains = ['denverpost.com', 'eastbaytimes.com', 'mercurynews.com', 'ocregister.com', 'pe.com', 'twincities.com'];
var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "betternutrition.com", "cleaneatingmag.com", "climbing.com", "cyclingtips.com", "gymclimber.com", "outsideonline.com", "oxygenmag.com", "pelotonmagazine.com", "podiumrunner.com", "rockandice.com", "skimag.com", "trailrunnermag.com", "triathlete.com", "vegetariantimes.com", "velonews.com", "womensrunning.com", "yogajournal.com"]; var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "betternutrition.com", "cleaneatingmag.com", "climbing.com", "cyclingtips.com", "gymclimber.com", "outsideonline.com", "oxygenmag.com", "pelotonmagazine.com", "podiumrunner.com", "rockandice.com", "skimag.com", "trailrunnermag.com", "triathlete.com", "vegetariantimes.com", "velonews.com", "womensrunning.com", "yogajournal.com"];
var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com']; var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com'];
@ -4314,9 +4314,9 @@ else if ((domain = matchDomain(usa_mcc_domains)) ||
(window.location.hostname.startsWith('account.') && document.querySelector('script[src*=".mcclatchyinteractive.com/"]')) || (window.location.hostname.startsWith('account.') && document.querySelector('script[src*=".mcclatchyinteractive.com/"]')) ||
(window.location.href.match(/\/\/amp\..+\.com\/(.+\/)?article(\d){8,}\.html/) && document.querySelector('a[href^="https://classifieds.mcclatchy.com/"]'))) { (window.location.href.match(/\/\/amp\..+\.com\/(.+\/)?article(\d){8,}\.html/) && document.querySelector('a[href^="https://classifieds.mcclatchy.com/"]'))) {
if (!domain) if (!domain)
domain = document.domain.replace(/(account|amp)\./, ''); domain = window.location.hostname.replace(/^(account|amp)\./, '');
let url = window.location.href; let url = window.location.href;
if (url.includes('account.' + domain + '/paywall/')) { if (url.includes('account.' + domain + '/paywall/subscriber-only?resume=')) {
window.setTimeout(function () { window.setTimeout(function () {
window.location.href = 'https://amp.' + domain + '/article' + url.split('resume=')[1].split(/[#&]/)[0] + '.html'; window.location.href = 'https://amp.' + domain + '/article' + url.split('resume=')[1].split(/[#&]/)[0] + '.html';
}, 500); }, 500);

View file

@ -93,7 +93,7 @@ window.setTimeout(function () {
group = '###_usa_townnews'; group = '###_usa_townnews';
else if (document.querySelector('meta[content^="https://www.mcclatchy-wires.com/"], a[href^="https://classifieds.mcclatchy.com/"]')) else if (document.querySelector('meta[content^="https://www.mcclatchy-wires.com/"], a[href^="https://classifieds.mcclatchy.com/"]'))
group = '###_usa_mcc'; group = '###_usa_mcc';
else if (document.querySelector('script[src*=".com/wp-content/plugins/dfm"]')) else if (document.querySelector('script[src*=".com/wp-content/plugins/dfm"], amp-img#paywall[src*=".com/wp-content/plugins/dfm-amp-mods/"]'))
group = '###_usa_mng'; group = '###_usa_mng';
else if (hostname.match(/\.com$/)) { else if (hostname.match(/\.com$/)) {
if (document.querySelector('link[href*=".com/wp-content/themes/madavor/"]')) if (document.querySelector('link[href*=".com/wp-content/themes/madavor/"]'))

View file

@ -400,6 +400,7 @@
"*://*.masslive.com/*", "*://*.masslive.com/*",
"*://*.maz-online.de/*", "*://*.maz-online.de/*",
"*://*.mcall.com/*", "*://*.mcall.com/*",
"*://*.mcclatchydc.com/*",
"*://*.medium.com/*", "*://*.medium.com/*",
"*://*.medscape.com/*", "*://*.medscape.com/*",
"*://*.menshealth.com/*", "*://*.menshealth.com/*",
@ -718,5 +719,5 @@
"*://*.wallkit.net/*", "*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "2.9.9.0" "version": "2.9.9.1"
} }

View file

@ -1213,6 +1213,7 @@ var defaultSites = {
"kansas.com", "kansas.com",
"kansascity.com", "kansascity.com",
"kentucky.com", "kentucky.com",
"mcclatchydc.com",
"miamiherald.com", "miamiherald.com",
"newsobserver.com", "newsobserver.com",
"sacbee.com", "sacbee.com",

View file

@ -6,10 +6,9 @@
"ld_google_webcache": "div.article--cropped|div#body-copy", "ld_google_webcache": "div.article--cropped|div#body-copy",
"new_site": 1 "new_site": 1
}, },
"L'Express": { "McClatchy DC": {
"domain": "lexpress.fr", "domain": "mcclatchydc.com",
"allow_cookies": 1, "block_regex": "js\\.matheranalytics\\.com"
"block_regex": "\\.qiota\\.com\\/data"
}, },
"Republic.ru": { "Republic.ru": {
"domain": "republic.ru", "domain": "republic.ru",
@ -31,10 +30,5 @@
"domain": "wonderzine.com", "domain": "wonderzine.com",
"allow_cookies": 1, "allow_cookies": 1,
"useragent": "facebookbot" "useragent": "facebookbot"
},
"Qiota": {
"domain": "qiota.com",
"allow_cookies": 1,
"block_regex_general": "\\.qiota\\.com\\/data"
} }
} }