Add TradeWinds
parent
dca44bcfc4
commit
7ef123c0d5
|
@ -115,7 +115,8 @@ _* free articles only._
|
|||
[Seeking Alpha](https://seekingalpha.com) -
|
||||
[Stock News](https://stocknews.com) -
|
||||
[The Business Journals](https://www.bizjournals.com) -
|
||||
[The Wall Street Journal](https://www.wsj.com)
|
||||
[The Wall Street Journal](https://www.wsj.com) -
|
||||
[TradeWinds](https://www.tradewindsnews.com)
|
||||
|
||||
##### Tech/Science
|
||||
[360Dx](https://www.360dx.com) -
|
||||
|
|
|
@ -1125,7 +1125,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
|||
bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(['asiatimes.com', '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', 'marketwatch.com', 'nationalreview.com', 'noz.de', 'nwzonline.de', 'scmp.com', 'seekingalpha.com', 'shz.de', 'staradvertiser.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk', 'washingtonpost.com'].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));
|
||||
}
|
||||
|
||||
if (!isSiteEnabled(details) && !allow_ext_source && !bpc_amp_site && !au_apn_site && !au_swm_site) {
|
||||
if (!isSiteEnabled(details) && !allow_ext_source && !bpc_amp_site && !au_apn_site && !au_swm_site) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1238,7 +1238,7 @@ if (matchUrlDomain(change_headers, details.url) && (['main_frame', 'sub_frame',
|
|||
}
|
||||
if ((!['font', 'stylesheet'].includes(details.type) || matchUrlDomain(cs_limit_except, currentTabUrl)) && !csDone) {
|
||||
let lib_file = 'lib/empty.js';
|
||||
if (matchUrlDomain(['cicero.de', 'economictimes.com', 'gva.be', 'lesechos.fr', 'newleftreview.org', 'newyorker.com', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'sudouest.fr', 'techinasia.com', 'valor.globo.com', 'washingtonpost.com'].concat(nl_mediahuis_region_domains), currentTabUrl))
|
||||
if (matchUrlDomain(['cicero.de', 'economictimes.com', 'gva.be', 'lesechos.fr', 'newleftreview.org', 'newyorker.com', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'sudouest.fr', 'techinasia.com', 'tradewindsnews.com', 'valor.globo.com', 'washingtonpost.com'].concat(nl_mediahuis_region_domains), currentTabUrl))
|
||||
lib_file = 'lib/purify.min.js';
|
||||
ext_api.tabs.executeScript(tabId, {
|
||||
file: lib_file,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
Changelog Bypass Paywalls Clean - Chrome
|
||||
|
||||
Post-release
|
||||
Add TradeWinds
|
||||
Fix Il Secolo XIX (amp-redirect)
|
||||
Fix Miami Herald (group McClatchy)
|
||||
Fix New Left Review (timing)
|
||||
|
|
|
@ -18,7 +18,7 @@ var usa_mcc_domains = ['bnd.com', 'charlotteobserver.com', 'fresnobee.com', 'kan
|
|||
var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com'];
|
||||
|
||||
// clean local storage of sites (with an exemption for hold-list)
|
||||
var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'elmundo.es', 'expansion.com', 'houstonchronicle.com', 'irishtimes.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk'];
|
||||
var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'elmundo.es', 'expansion.com', 'houstonchronicle.com', 'irishtimes.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk', 'tradewindsnews.com'];
|
||||
arr_localstorage_hold = arr_localstorage_hold.concat(de_funke_media_domains, es_grupo_vocento_domains);
|
||||
if (!matchDomain(arr_localstorage_hold)) {
|
||||
window.localStorage.clear();
|
||||
|
@ -2458,6 +2458,50 @@ else if (matchDomain('timeshighereducation.com')) {
|
|||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('tradewindsnews.com')) {
|
||||
let url = window.location.href;
|
||||
if (url.includes('.com/markets/')) {
|
||||
let paywall = document.querySelector('iframe[src]');
|
||||
removeDOMElement(paywall);
|
||||
let overflow = document.querySelector('body[style]');
|
||||
if (overflow)
|
||||
overflow.removeAttribute('style');
|
||||
let blurred = document.querySelector('body > div[style]');
|
||||
if (blurred)
|
||||
blurred.removeAttribute('style');
|
||||
} else {
|
||||
window.setTimeout(function () {
|
||||
let paywall = document.querySelector('iframe#paywall-iframe');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.text().then(html => {
|
||||
let split1 = html.split('window.__INITIAL_STATE__=')[1];
|
||||
let state = split1.split('};')[0] + '}';
|
||||
if (state) {
|
||||
let json = JSON.parse(state);
|
||||
if (json) {
|
||||
let json_text = json.article.body;
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text, {ADD_ATTR: ['itemprop']}) + '</div>', 'text/html');
|
||||
let article_new = doc.querySelector('div');
|
||||
let article = document.querySelector('div.article-body-preview');
|
||||
if (article_new) {
|
||||
if (article)
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}, 500); // Delay (in milliseconds)
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(usa_crainsbiz_domains.concat(['modernhealthcare.com']))) {
|
||||
let body_hidden = document.querySelector('body[class]');
|
||||
if (body_hidden)
|
||||
|
|
|
@ -38,5 +38,5 @@
|
|||
"webRequestBlocking",
|
||||
"<all_urls>"
|
||||
],
|
||||
"version": "2.2.8.6"
|
||||
"version": "2.2.8.7"
|
||||
}
|
|
@ -456,6 +456,7 @@
|
|||
"*://*.tlz.de/*",
|
||||
"*://*.towardsdatascience.com/*",
|
||||
"*://*.townsvillebulletin.com.au/*",
|
||||
"*://*.tradewindsnews.com/*",
|
||||
"*://*.tri-cityherald.com/*",
|
||||
"*://*.trouw.nl/*",
|
||||
"*://*.tubantia.nl/*",
|
||||
|
@ -522,5 +523,5 @@
|
|||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.2.8.6"
|
||||
"version": "2.2.8.7"
|
||||
}
|
1
sites.js
1
sites.js
|
@ -287,6 +287,7 @@ var defaultSites =
|
|||
"Times Higher Education": "timeshighereducation.com",
|
||||
"Times of India": "###_timesofindia",
|
||||
"Towards Data Science": "towardsdatascience.com",
|
||||
"TradeWinds": "tradewindsnews.com",
|
||||
"Tribune Publishing Company": "###_usa_tribune",
|
||||
"Trouw": "trouw.nl",
|
||||
"USA Today": "usatoday.com",
|
||||
|
|
Loading…
Reference in New Issue