Remove Stratfor (fix obsolete)

merge-requests/15/head
magnolia1234 1 year ago
parent a7b7eed217
commit 69d1990429

@ -81,7 +81,6 @@ _* free articles only._
[Inkl](https://www.inkl.com) -
[Newsweek](https://www.newsweek.com) -
[Reuters](https://www.reuters.com) -
[Stratfor](https://stratfor.com) -
[The New York Times](https://www.nytimes.com) -
[The Washington Post](https://www.washingtonpost.com) -
[Time Magazine](https://time.com)

@ -978,8 +978,7 @@ if (matchUrlDomain(change_headers, details.url) && !ignore_types.includes(detail
!(matchUrlDomain(au_news_corp_domains, details.url) && (details.url.includes('?amp') || (!matchUrlDomain(au_news_corp_no_amp_fix, details.url) && enabledSites.includes('#options_disable_gb_au_news_corp')))) &&
!(matchUrlDomain('uol.com.br', details.url) && !matchUrlDomain('folha.uol.com.br', details.url)) &&
!(matchUrlDomain('wsj.com', details.url) && (enabledSites.includes('#options_disable_gb_wsj') || (!details.url.includes('/articles/') && mobile)));
var bingbotEnabled = matchUrlDomain(use_bing_bot, details.url) &&
!(matchUrlDomain('stratfor.com', details.url) && details.url.match(/(\/(\d){4}-([a-z]||-)+-forecast(-([a-z]|-)+)?|-forecast-(\d){4}-([a-z]|[0-9]||-)+)$/));
var bingbotEnabled = matchUrlDomain(use_bing_bot, details.url);
var facebookbotEnabled = matchUrlDomain(use_facebook_bot, details.url);
// if referer exists, set it

@ -6,6 +6,7 @@ Post-release
Add Groupe ESH Medias (ch)
Add Zeit.de (link to archive.is)
Remove LePoint.fr (fix obsolete)
Remove Stratfor (fix obsolete)
Fix Beobachter.ch & Handelszeitung.ch
Fix Foreign Policy (Insider)
Fix Telegraaf.nl (images)

@ -4339,51 +4339,6 @@ else if (matchDomain('statista.com')) {
}
}
else if (matchDomain('stratfor.com')) {
let banner = document.querySelector('.free-cta-container, .paywall-banner');
removeDOMElement(banner);
let hidden_images = document.querySelectorAll('img[src^="data:image/gif"][data-src]');
for (let hidden_image of hidden_images)
hidden_image.setAttribute('src', hidden_image.getAttribute('data-src'));
if (window.location.pathname.match(/(\/(\d){4}-([a-z]|-)+-forecast(-([a-z]|-)+)?|-forecast-(\d){4}-([a-z]|[0-9]|-)+)$/)) {
let json_script = document.querySelector('script#__NEXT_DATA__');
if (json_script && dompurify_loaded) {
let json = JSON.parse(json_script.innerText);
if (json && json.props.pageProps.data) {
let overview_div = document.querySelector('div[class^="overview_overview__"] > div');
if (overview_div) {
let data = json.props.pageProps.data;
let parser = new DOMParser();
let data_overview = data.overview;
if (!parseHtmlEntities(data_overview).includes(data.teaser_body))
data_overview = '<p>' + data.teaser_body + '</p>' + data_overview;
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(data_overview) + '<p><h2>Sections</h2></p>' + '</div>', 'text/html');
let content_new = doc.querySelector('div');
let sections = data.section;
for (let section of sections) {
let section_link = document.createElement('a');
section_link.innerText = section.title;
section_link.href = 'https://' + window.location.hostname + '/' + section.path_alias;
content_new.appendChild(section_link);
content_new.appendChild(document.createElement('br'));
}
overview_div.parentNode.replaceChild(content_new, overview_div);
csDoneOnce = true;
}
}
}
waitDOMElement('div.paywall-banner', 'DIV', removeDOMElement, false);
} else if (window.location.pathname.match(/\/article\/.+-forecast(-.+)?\//)) {
let next_section_buttons = document.querySelectorAll('div[class^="nextSection_nextSection__"] > button');
for (let elem of next_section_buttons) {
let section_link = document.createElement('a');
section_link.innerText = elem.innerText;
section_link.href = url.replace(/[^\/]+$/, '') + elem.innerText.split(': ')[1].toLowerCase().split(' ').filter(x => !['a', 'an', 'of', 'the'].includes(x)).join('-');
elem.parentNode.replaceChild(section_link, elem);
}
}
}
else if (matchDomain('studocu.com')) {
window.setTimeout(function () {
let paywall = document.querySelector('button[data-test-selector^="preview-banner-"]');

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.2.2.4"
"version": "3.2.2.5"
}

@ -587,7 +587,6 @@
"*://*.statista.com/*",
"*://*.stcatharinesstandard.ca/*",
"*://*.stocknews.com/*",
"*://*.stratfor.com/*",
"*://*.studocu.com/*",
"*://*.stylist.co.uk/*",
"*://*.sudinfo.be/*",
@ -760,5 +759,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.2.2.4"
"version": "3.2.2.5"
}

@ -1861,12 +1861,6 @@ var defaultSites = {
domain: "stocknews.com",
allow_cookies: 1
},
"Stratfor": {
domain: "stratfor.com",
allow_cookies: 1,
cs_dompurify: 1,
useragent: "bingbot"
},
"StuDocu (no downloads)": {
domain: "studocu.com",
allow_cookies: 1
@ -2600,4 +2594,4 @@ init_custom_flex_domains();
// sites with no fix (background)
var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'lastampa.it', 'limesonline.com', 'repubblica.it'];
var nofix_sites = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'business-standard.com', 'businessinsider.de', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'diepresse.com', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'handelsblatt.com', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lepoint.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'lopinion.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'morningstar.com', 'nationaljournal.com', 'manager-magazin.de', 'mz.de', 'nature.com', 'nbr.co.nz', 'nn.de', 'nwzonline.de', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'puck.news', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'volksstimme.de', 'welt.de', 'weltkunst.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(it_gedi_nofix_domains);
var nofix_sites = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'business-standard.com', 'businessinsider.de', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'diepresse.com', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'handelsblatt.com', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lepoint.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'lopinion.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'morningstar.com', 'nationaljournal.com', 'manager-magazin.de', 'mz.de', 'nature.com', 'nbr.co.nz', 'nn.de', 'nwzonline.de', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'puck.news', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'volksstimme.de', 'welt.de', 'weltkunst.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(it_gedi_nofix_domains);

Loading…
Cancel
Save