Add USA Today
This commit is contained in:
parent
48ba220234
commit
0a77a50363
@ -187,7 +187,9 @@ _* free articles only._
|
||||
[The Mercury News](https://www.mercurynews.com) -
|
||||
[The Seattle Times](https://www.seattletimes.com) -
|
||||
[The Philadelphia Inquirer](https://www.inquirer.com) -
|
||||
[Winston-Salem Journal](https://www.journalnow.com)\
|
||||
[Winston-Salem Journal](https://www.journalnow.com)
|
||||
|
||||
[USA Today](https://www.usatoday.com)\
|
||||
Grouped in options:\
|
||||
Gannett Group (local USA Today) sites like (opt-in to custom sites)
|
||||
[Detroit Free Press](https://www.freep.com) -
|
||||
|
@ -157,6 +157,7 @@ var allow_cookies_default = [
|
||||
'time.com',
|
||||
'timeshighereducation.com',
|
||||
'towardsdatascience.com',
|
||||
'usatoday.com',
|
||||
'usinenouvelle.com',
|
||||
'variety.com',
|
||||
'velonews.com',
|
||||
@ -230,6 +231,7 @@ var use_google_bot_default = [
|
||||
'seekingalpha.com',
|
||||
'statista.com',
|
||||
'thetimes.co.uk',
|
||||
'usatoday.com',
|
||||
'usinenouvelle.com',
|
||||
'washingtonpost.com',
|
||||
'wired.com',
|
||||
@ -1027,7 +1029,8 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
let uk_nlr_site = (matchUrlDomain('stripe.com', details.url) && matchUrlDomain('newleftreview.org', header_referer));
|
||||
let usa_discmag_site = (matchUrlDomain('ctfassets.net', details.url) && matchUrlDomain('discovermagazine.com', header_referer));
|
||||
let usa_mw_site = (matchUrlDomain('wsj.net', details.url) && matchUrlDomain('marketwatch.com', header_referer));
|
||||
allow_ext_source = allow_ext_source || inkl_site || cl_elmerc_site || es_elesp_site || it_repubblica_site || uk_nlr_site || usa_discmag_site || usa_mw_site;
|
||||
let usa_today_site = (matchUrlDomain('gannett-cdn.com', details.url) && matchUrlDomain(['usatoday.com'], header_referer));
|
||||
allow_ext_source = allow_ext_source || inkl_site || cl_elmerc_site || es_elesp_site || it_repubblica_site || uk_nlr_site || usa_discmag_site || usa_mw_site || usa_today_site;
|
||||
|
||||
bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(['augsburger-allgemeine.de', 'barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elmundo.es', 'elpais.com', 'elperiodico.com', 'expansion.com', 'freiepresse.de', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'lne.es', 'marketwatch.com', 'nationalreview.com', 'noz.de', 'nwzonline.de', 'seekingalpha.com', 'shz.de', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk'].concat(au_news_corp_domains, au_nine_domains, de_madsack_domains, es_epiberica_domains, es_grupo_vocento_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_repubblica_domains, usa_mcc_domains, usa_theathletic_domains), header_referer));
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Chrome
|
||||
|
||||
Post-release
|
||||
Add The Economic Times (text/India)
|
||||
Add USA Today
|
||||
Fix-update American Banker
|
||||
Fix-update El Mercurio (Chile)
|
||||
Fix-update Reuters
|
||||
|
@ -368,10 +368,10 @@ else if (matchDomain('faz.net')) {
|
||||
article_text.innerText = '';
|
||||
|
||||
const breakText = (str) => {
|
||||
str = str.replace(/(?:^|[\w\"\“])(\.|\?|!)(?=[A-ZÖÜ\„][A-Za-zÀ-ÿ\„]{1,})/gm, "$&\n\n");
|
||||
str = str.replace(/([a-z\"\“])(?=[A-Z](?=[A-Za-zÀ-ÿ]+))/gm, "$&\n\n");
|
||||
str = str.replace(/(?:^|[A-Za-z\"\“])(\.|\?|!)(?=[A-ZÖÜ\„\d][A-Za-zÀ-ÿ\„\d]{1,})/gm, "$&\n\n");
|
||||
str = str.replace(/(([a-z]{2,}|[\"\“]))(?=[A-Z](?=[A-Za-zÀ-ÿ]+))/gm, "$&\n\n");
|
||||
// exceptions: names with alternating lower/uppercase (no general fix)
|
||||
let str_rep_arr = ['BaFin', 'BerlHG', 'BfArM', 'BilMoG', 'DiGA', 'EuGH', 'eWpG', 'FinTechRat', 'GlaxoSmithKline', 'gGmbH', 'IfSG', 'iMessage', 'iOS', 'iPad', 'iPhone', 'iShares', 'medRxiv', 'mRNA', 'PlosOne', 'StVO'];
|
||||
let str_rep_arr = ['AstraZeneca', 'BaFin', 'BerlHG', 'BfArM', 'BilMoG', 'DiGA', 'EuGH', 'FinTechRat', 'GlaxoSmithKline', 'IfSG', 'medRxiv', 'PlosOne', 'StVO'];
|
||||
let str_rep_split,
|
||||
str_rep_src;
|
||||
for (let str_rep of str_rep_arr) {
|
||||
@ -2295,6 +2295,21 @@ else if (matchDomain('timeshighereducation.com')) {
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('usatoday.com')) {
|
||||
let roadblock = document.querySelector('.roadblock-container');
|
||||
if (roadblock) {
|
||||
removeDOMElement(roadblock);
|
||||
article_next = document.querySelector('article.next-in-depth-story > div.article-inner');
|
||||
if (article_next) {
|
||||
let url = article_next.getAttribute('data-url');
|
||||
let weblink = document.createElement('a');
|
||||
weblink.href = url;
|
||||
weblink.innerText = 'open next in-depth story';
|
||||
article_next.appendChild(weblink);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('velonews.com')) {
|
||||
let paywall = document.querySelector('div.o-membership-overlay');
|
||||
if (paywall) {
|
||||
|
@ -30,5 +30,5 @@
|
||||
"webRequestBlocking",
|
||||
"<all_urls>"
|
||||
],
|
||||
"version": "2.1.9.4"
|
||||
"version": "2.1.9.5"
|
||||
}
|
@ -435,6 +435,7 @@
|
||||
"*://*.tri-cityherald.com/*",
|
||||
"*://*.trouw.nl/*",
|
||||
"*://*.tubantia.nl/*",
|
||||
"*://*.usatoday.com/*",
|
||||
"*://*.usinenouvelle.com/*",
|
||||
"*://*.uusisuomi.fi/*",
|
||||
"*://*.valeursactuelles.com/*",
|
||||
@ -484,6 +485,7 @@
|
||||
"*://*.epimg.net/*",
|
||||
"*://*.flip-pay.com/*",
|
||||
"*://*.ffx.io/*",
|
||||
"*://*.gannett-cdn.com/*",
|
||||
"*://*.htmedia.in/*",
|
||||
"*://*.jsdelivr.net/*",
|
||||
"*://*.lightboxcdn.com/*",
|
||||
@ -497,5 +499,5 @@
|
||||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.1.9.4"
|
||||
"version": "2.1.9.5"
|
||||
}
|
@ -201,16 +201,11 @@ function request_permissions() {
|
||||
// remove permissions for custom sites
|
||||
function remove_permissions() {
|
||||
var perm_custom = document.getElementById('perm-custom');
|
||||
var custom_enabled = document.getElementById('custom-enabled');
|
||||
ext_api.permissions.remove({
|
||||
origins: perm_origins
|
||||
}, function (removed) {
|
||||
if (removed) {
|
||||
perm_custom.innerText = 'NO';
|
||||
custom_enabled.innerText = 'NO';
|
||||
ext_api.storage.local.set({
|
||||
"customOptIn": false
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
1
sites.js
1
sites.js
@ -284,6 +284,7 @@ var defaultSites =
|
||||
"Towards Data Science": "towardsdatascience.com",
|
||||
"Tribune Publishing Company": "###_usa_tribune",
|
||||
"Trouw": "trouw.nl",
|
||||
"USA Today": "usatoday.com",
|
||||
"Valeurs Actuelles": "valeursactuelles.com",
|
||||
"Vanity Fair": "vanityfair.com",
|
||||
"Variety": "variety.com",
|
||||
|
Loading…
x
Reference in New Issue
Block a user