@ -1,6 +1,7 @@
// clean local storage of sites (with an exemption for hold-list)
var arr _localstorage _hold = [ 'sfchronicle.com' ] ;
var localstorage _hold = arr _localstorage _hold . some ( function ( url ) {
return window . location . href . indexOf ( url ) !== - 1 ;
return matchDomain ( url ) ;
} ) ;
if ( ! localstorage _hold ) {
@ -8,7 +9,29 @@ if (!localstorage_hold){
}
// Content workarounds/domain
if ( window . location . hostname . endsWith ( 'rep.repubblica.it' ) ) {
// Australian Community Media newspapers
if ( window . location . hostname . endsWith ( ".com.au" ) || window . location . hostname . endsWith ( ".net.au" ) ) {
let au _sites = [ 'bendigoadvertiser.com.au' , 'bordermail.com.au' , 'canberratimes.com.au' , 'centralwesterndaily.com.au' , 'dailyadvertiser.com.au' , 'dailyliberal.com.au' , 'examiner.com.au' , 'illawarramercury.com.au' , 'newcastleherald.com.au' , 'northerndailyleader.com.au' , 'portnews.com.au' , 'standard.net.au' , 'theadvocate.com.au' , 'thecourier.com.au' ] ;
let au _piano _script = document . querySelector ( 'script[src="https://cdn-au.piano.io/api/tinypass.min.js"]' ) ;
if ( matchDomain ( au _sites ) || au _piano _script ) {
const subscribe _truncate = document . querySelector ( '.subscribe-truncate' ) ;
if ( subscribe _truncate )
subscribe _truncate . classList . remove ( 'subscribe-truncate' ) ;
const subscriber _hider = document . querySelectorAll ( '.subscriber-hider' ) ;
for ( let i = 0 ; i < subscriber _hider . length ; i ++ ) {
subscriber _hider [ i ] . classList . remove ( 'subscriber-hider' ) ;
}
}
}
else if ( matchDomain ( "thesaturdaypaper.com.au" ) ) {
const expand _button = document . querySelector ( '.continue-reading-button' ) ;
if ( expand _button )
expand _button . click ( ) ;
}
else if ( matchDomain ( 'rep.repubblica.it' ) ) {
setTimeout ( function ( ) {
if ( window . location . href . includes ( '/pwa/' ) ) {
window . location . href = window . location . href . replace ( '/pwa/' , '/ws/detail/' ) ;
@ -24,13 +47,13 @@ if (window.location.hostname.endsWith('rep.repubblica.it')) {
}
}
if ( window . location . href . indexOf ( "americanbanker.com" ) !== - 1 ) {
const paywall = document . getElementsByClassName( 'embargo-content' ) [ 0 ] ;
else if ( matchDomain ( "americanbanker.com" ) ) {
const paywall = document . querySelector( '.embargo-content' ) ;
if ( paywall )
paywall . classList . remove ( 'embargo-content' ) ;
}
if ( window . location . href . indexOf ( 'telegraaf.nl' ) !== - 1 ) {
else if ( matchDomain ( 'telegraaf.nl' ) ) {
setTimeout ( function ( ) {
const paywall = document . getElementById ( 'TEMPRORARY_METERING_ID' ) ;
if ( paywall ) {
@ -39,30 +62,28 @@ if (window.location.href.indexOf('telegraaf.nl') !== -1) {
} , 1000 ) ; // Delay (in milliseconds)
}
if ( window . location . href . indexOf ( 'ad.nl' ) !== - 1 || window . location . href . indexOf ( 'ed.nl' ) !== - 1 ) {
else if ( matchDomain ( 'ad.nl' ) ) {
let paywall = document . querySelector ( '.article__component.article__component--paywall-module-notification' ) ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "washingtonpost.com" ) !== - 1 ) {
else if ( matchDomain ( "washingtonpost.com" ) ) {
if ( location . href . includes ( '/gdpr-consent/' ) ) {
const free _button = document . querySelector ( '.gdpr-consent-container .continue-btn.button.free' ) ;
if ( free _button )
free _button . click ( ) ;
setTimeout ( function ( ) {
const gdprcheckbox = document . querySelector ( '.gdpr-consent-container .consent-page:not(.hide) #agree' ) ;
if ( gdprcheckbox ) {
gdprcheckbox . checked = true ;
gdprcheckbox . dispatchEvent ( new Event ( 'change' ) ) ;
document . querySelector ( '.gdpr-consent-container .consent-page:not(.hide) .continue-btn.button.accept-consent' ) . click ( ) ;
}
} , 300 ) ; // Delay (in milliseconds)
}
}
if ( window . location . href . indexOf ( "wsj.com" ) !== - 1 ) {
else if ( matchDomain ( "wsj.com" ) ) {
if ( location . href . includes ( '/articles/' ) ) {
const close _button = document . querySelector ( '.close-btn' ) ;
if ( close _button )
@ -70,13 +91,13 @@ if (window.location.href.indexOf("wsj.com") !== -1) {
}
}
if ( window . location . href . indexOf ( "sloanreview.mit.edu" ) !== - 1 ) {
else if ( matchDomain ( "sloanreview.mit.edu" ) ) {
const read _more = document . querySelector ( '.btn-read-more' ) ;
if ( read _more )
read _more . click ( ) ;
}
if ( window . location . href . indexOf ( "mexiconewsdaily.com" ) !== - 1 ) {
else if ( matchDomain ( "mexiconewsdaily.com" ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const sideNotification = document . querySelector ( '.pigeon-widget-prompt' ) ;
const subMessage = document . querySelector ( '.sub_message_container' ) ;
@ -86,15 +107,15 @@ if (window.location.href.indexOf("mexiconewsdaily.com") !== -1) {
} ) ;
}
if ( window . location . href . indexOf ( "the-american-interest.com" ) !== - 1 ) {
else if ( matchDomain ( "the-american-interest.com" ) ) {
const counter = document . getElementById ( 'article-counter' ) ;
removeDOMElement ( counter ) ;
}
if ( window . location . href . indexOf ( "nzherald.co.nz" ) !== - 1 ) {
else if ( matchDomain ( "nzherald.co.nz" ) ) {
const paywall = document . getElementById ( 'article-content' ) ;
if ( paywall ) {
const premium = document . getElementsByClassName( 'premium-sub' ) [ 0 ] ;
const premium = document . querySelector( '.premium-sub' ) ;
removeDOMElement ( premium ) ;
paywall . classList . remove ( 'premium-content' ) ;
paywall . classList . add ( 'full-content' ) ;
@ -108,7 +129,7 @@ if (window.location.href.indexOf("nzherald.co.nz") !== -1) {
}
}
if ( window . location . href . indexOf ( "parool.nl" ) !== - 1 || window . location . href . indexOf ( "trouw.nl" ) !== - 1 || window . location . href . indexOf ( "volkskrant.nl" ) !== - 1 || window . location . href . indexOf ( "humo.be" ) !== - 1 || window . location . href . indexOf ( "demorgen.be" ) !== - 1 ) {
else if ( matchDomain ( [ "parool.nl" , "trouw.nl" , "volkskrant.nl" , "humo.be" , "demorgen.be" ] ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const paywall = document . querySelector ( 'div[data-temptation-position="ARTICLE_BOTTOM"]' ) ;
const hidden _section = document . querySelector ( 'div[data-temptation-position="ARTICLE_INLINE"]' ) ;
@ -116,12 +137,12 @@ if (window.location.href.indexOf("parool.nl") !== -1 || window.location.href.ind
} ) ;
}
if ( window . location . href . indexOf ( "firstthings.com" ) !== - 1 ) {
const paywall = document . getElementsByClassName( 'paywall' ) [ 0 ] ;
else if ( matchDomain ( "firstthings.com" ) ) {
const paywall = document . querySelector( '.paywall' ) ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "bloomberg.com" ) !== - 1 ) {
else if ( matchDomain ( "bloomberg.com" ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const fence = document . querySelector ( '.fence-body' ) ;
if ( fence ) {
@ -132,58 +153,58 @@ if (window.location.href.indexOf("bloomberg.com") !== -1) {
removeDOMElement ( banner ) ;
}
if ( window . location . href . indexOf ( "bloombergquint.com" ) !== - 1 ) {
const articlesLeftModal = document . getElementsByClassName( ' paywall-meter-module__story-paywall-container__1UgCE') [ 0 ] ;
else if ( matchDomain ( "bloombergquint.com" ) ) {
const articlesLeftModal = document . querySelector( '. paywall-meter-module__story-paywall-container__1UgCE') ;
const paywall = document . getElementById ( 'paywallDmp' ) ;
removeDOMElement ( articlesLeftModal , paywall ) ;
}
if ( window . location . href . indexOf ( "medium.com" ) !== - 1 ) {
else if ( matchDomain ( "medium.com" ) ) {
const bottomMessageText = 'Get one more story in your member preview when you sign up. It’ s free.' ;
const DOMElementsToTextDiv = pageContains ( 'div' , bottomMessageText ) ;
if ( DOMElementsToTextDiv [ 2 ] ) removeDOMElement ( DOMElementsToTextDiv [ 2 ] ) ;
}
if ( window . location . href . indexOf ( 'lemonde.fr' ) !== - 1 ) {
else if ( matchDomain ( 'lemonde.fr' ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const hidden _section = document . getElementsByClassName( 'article__content--restricted-media' ) [ 0 ] ;
const hidden _section = document . querySelector( '.article__content--restricted-media' ) ;
if ( hidden _section )
hidden _section . classList . remove ( 'article__content--restricted-media' ) ;
const longform _article _restricted = document . getElementsByClassName( 'article__content--restricted' ) [ 0 ] ;
const longform _article _restricted = document . querySelector( '.article__content--restricted' ) ;
if ( longform _article _restricted )
longform _article _restricted . classList . remove ( 'article__content--restricted' ) ;
const longform _paywall = document . getElementsByClassName( 'paywall--longform' ) [ 0 ] ;
const longform _paywall = document . querySelector( '.paywall--longform' ) ;
if ( longform _paywall )
longform _paywall . classList . remove ( 'paywall--longform' ) ;
const paywall = document . getElementById ( 'js-paywall-content' ) ;
const friend _paywall = document . getElementsByClassName( 'friend--paywall' ) [ 0 ] ;
const friend _paywall = document . querySelector( '.friend--paywall' ) ;
const cookie _banner = document . getElementById ( 'cookie-banner' ) ;
removeDOMElement ( paywall , friend _paywall , cookie _banner ) ;
} ) ;
}
if ( window . location . href . indexOf ( "ledevoir.com" ) !== - 1 ) {
else if ( matchDomain ( "ledevoir.com" ) ) {
const counter = document . querySelector ( '.popup-msg' ) ;
removeDOMElement ( counter ) ;
}
if ( window . location . href . includes ( 'ft.com' ) ) {
else if ( matchDomain ( 'ft.com' ) ) {
const cookie _banner = document . querySelector ( '.n-messaging-banner__outer' ) ;
removeDOMElement ( cookie _banner ) ;
}
if ( window . location . href . indexOf ( "thehindu.com" ) !== - 1 ) {
else if ( matchDomain ( "thehindu.com" ) ) {
const paywall = document . getElementById ( 'test' ) ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "nytimes.com" ) !== - 1 ) {
else if ( matchDomain ( "nytimes.com" ) ) {
const preview _button = document . querySelector ( '.css-3s1ce0' ) ;
if ( preview _button )
preview _button . click ( ) ;
}
if ( window . location . href . indexOf ( "economist.com" ) !== - 1 ) {
else if ( matchDomain ( "economist.com" ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const subscribe = document . querySelector ( '.subscription-proposition' ) ;
const advert = document . querySelector ( '.advert' ) ;
@ -211,7 +232,7 @@ if (window.location.href.indexOf("economist.com") !== -1) {
} ) ;
}
if ( window . location . href . indexOf ( "bizjournals.com" ) !== - 1 ) {
else if ( matchDomain ( "bizjournals.com" ) ) {
const sheet _overlay = document . querySelector ( '.sheet-overlay' ) ;
const chunk _paywall = document . querySelector ( '.chunk--paywall' ) ;
removeDOMElement ( sheet _overlay , chunk _paywall ) ;
@ -223,12 +244,12 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
body _hidden . removeAttribute ( 'style' ) ;
}
if ( window . location . href . indexOf ( "the-tls.co.uk" ) !== - 1 ) {
else if ( matchDomain ( "the-tls.co.uk" ) ) {
const paywall = document . querySelector ( '.tls-subscriptions-banner__closed-skin' ) ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "caixinglobal.com" ) !== - 1 ) {
else if ( matchDomain ( "caixinglobal.com" ) ) {
const pay _tip = document . querySelectorAll ( '.cons-pay-tip' ) ;
for ( let i = 0 ; i < pay _tip . length ; i ++ ) {
pay _tip [ i ] . removeAttribute ( 'style' ) ;
@ -242,7 +263,7 @@ if (window.location.href.indexOf("caixinglobal.com") !== -1) {
}
}
if ( window . location . href . indexOf ( "nrc.nl" ) !== - 1 ) {
else if ( matchDomain ( "nrc.nl" ) ) {
const paywall = document . querySelector ( '.has-paywall' ) ;
if ( paywall )
paywall . classList . remove ( "has-paywall" ) ;
@ -251,7 +272,7 @@ if (window.location.href.indexOf("nrc.nl") !== -1) {
paywall _overlay . classList . remove ( "has-paywall-overlay" ) ;
}
if ( window . location . href . indexOf ( "scribd.com" ) !== - 1 ) {
else if ( matchDomain ( "scribd.com" ) ) {
const blur = document . querySelectorAll ( '.blurred_page' ) ;
for ( let i = 0 ; i < blur . length ; i ++ ) {
blur [ i ] . classList . remove ( 'blurred_page' ) ;
@ -263,14 +284,14 @@ if (window.location.href.indexOf("scribd.com") !== -1) {
removeDOMElement ( portal , page _module , promo , ad ) ;
}
if ( window . location . href . indexOf ( "thetimes.co.uk" ) !== - 1 ) {
else if ( matchDomain ( "thetimes.co.uk" ) ) {
const block = document . querySelector ( '.subscription-block' ) ;
const ad _block = document . getElementById ( 'ad-article-inline' )
const ad _header = document . getElementById ( 'sticky-ad-header' )
removeDOMElement ( block , ad _block , ad _header ) ;
}
if ( window . location . href . indexOf ( "technologyreview.com" ) !== - 1 ) {
else if ( matchDomain ( "technologyreview.com" ) ) {
const read _story = document . querySelector ( '.storyExpanderButton' ) ;
if ( read _story )
read _story . click ( ) ;
@ -278,22 +299,22 @@ if (window.location.href.indexOf("technologyreview.com") !== -1) {
removeDOMElement ( meter ) ;
}
if ( window . location . href . indexOf ( "haaretz.com" ) !== - 1 ) {
else if ( matchDomain ( "haaretz.com" ) ) {
const popup = document . querySelector ( '.footer-ruler' ) ;
removeDOMElement ( popup ) ;
}
if ( window . location . href . indexOf ( "asia.nikkei.com" ) !== - 1 ) {
else if ( matchDomain ( "asia.nikkei.com" ) ) {
const popup = document . querySelector ( '.pw-widget--popup' ) ;
removeDOMElement ( popup ) ;
}
if ( window . location . href . indexOf ( "hbr.org" ) !== - 1 ) {
else if ( matchDomain ( "hbr.org" ) ) {
const popup = document . querySelector ( '.persistent-banner' ) ;
removeDOMElement ( popup ) ;
}
if ( window . location . href . indexOf ( "techinasia.com" ) !== - 1 ) {
else if ( matchDomain ( "techinasia.com" ) ) {
const paywall = document . querySelector ( '.paywall-content' ) ;
if ( paywall ) {
paywall . classList . remove ( 'paywall-content' ) ;
@ -303,7 +324,7 @@ if (window.location.href.indexOf("techinasia.com") !== -1) {
removeDOMElement ( splash _subscribe , paywall _hard ) ;
}
if ( window . location . href . indexOf ( "thestar.com" ) !== - 1 ) {
else if ( matchDomain ( "thestar.com" ) ) {
const paywall = document . querySelector ( '.basic-paywall-new' ) ;
removeDOMElement ( paywall ) ;
const tbc = document . querySelectorAll ( '.text-block-container' ) ;
@ -312,12 +333,12 @@ if (window.location.href.indexOf("thestar.com") !== -1) {
}
}
if ( window . location . href . indexOf ( "afr.com" ) !== - 1 ) {
else if ( matchDomain ( "afr.com" ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const hidden _image = document . querySelectorAll ( 'img' ) ;
for ( let i = 0 ; i < hidden _image . length ; i ++ ) {
var src = hidden _image [ i ] . src ;
if ( src . in dexOf( ".gif" ) !== - 1 ) {
if ( src . in cludes( ".gif" ) ) {
var data _src = hidden _image [ i ] . getAttribute ( "data-src" ) ;
if ( data _src )
hidden _image [ i ] . setAttribute ( 'src' , data _src ) ;
@ -328,7 +349,7 @@ if (window.location.href.indexOf("afr.com") !== -1) {
} ) ;
}
if ( window . location . href . indexOf ( "theglobeandmail.com" ) !== - 1 ) {
else if ( matchDomain ( "theglobeandmail.com" ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const lazy _image = document . querySelectorAll ( '.js-lazyimage' ) ;
for ( let i = 0 ; i < lazy _image . length ; i ++ ) {
@ -337,7 +358,7 @@ if (window.location.href.indexOf("theglobeandmail.com") !== -1) {
const hidden _image = document . querySelectorAll ( 'img' ) ;
for ( let i = 0 ; i < hidden _image . length ; i ++ ) {
var src = hidden _image [ i ] . src ;
if ( src . in dexOf( "data:image/gif" ) !== - 1 ) {
if ( src . in cludes( "data:image/gif" ) ) {
var data _src = hidden _image [ i ] . getAttribute ( "data-src" ) ;
if ( data _src )
hidden _image [ i ] . setAttribute ( 'src' , data _src ) ;
@ -349,34 +370,12 @@ if (window.location.href.indexOf("theglobeandmail.com") !== -1) {
} ) ;
}
// Australian Community Media newspapers
if ( window . location . href . indexOf ( ".com.au" ) !== - 1 || window . location . href . indexOf ( ".net.au" ) !== - 1 ) {
let au _sites = [ 'bendigoadvertiser.com.au' , 'bordermail.com.au' , 'canberratimes.com.au' , 'centralwesterndaily.com.au' , 'dailyadvertiser.com.au' , 'dailyliberal.com.au' , 'examiner.com.au' , 'illawarramercury.com.au' , 'newcastleherald.com.au' , 'northerndailyleader.com.au' , 'portnews.com.au' , 'standard.net.au' , 'theadvocate.com.au' , 'thecourier.com.au' ] ;
let domain = new URL ( window . location . href ) . hostname . replace ( 'www.' , '' ) ;
let au _piano _script = document . querySelector ( 'script[src="https://cdn-au.piano.io/api/tinypass.min.js"]' ) ;
if ( au _sites . includes ( domain ) || au _piano _script ) {
const subscribe _truncate = document . querySelector ( '.subscribe-truncate' ) ;
if ( subscribe _truncate )
subscribe _truncate . classList . remove ( 'subscribe-truncate' ) ;
const subscriber _hider = document . querySelectorAll ( '.subscriber-hider' ) ;
for ( let i = 0 ; i < subscriber _hider . length ; i ++ ) {
subscriber _hider [ i ] . classList . remove ( 'subscriber-hider' ) ;
}
}
}
if ( window . location . href . indexOf ( "thesaturdaypaper.com.au" ) !== - 1 ) {
const expand _button = document . querySelector ( '.continue-reading-button' ) ;
if ( expand _button )
expand _button . click ( ) ;
}
if ( window . location . href . indexOf ( "sofrep.com" ) !== - 1 ) {
else if ( matchDomain ( "sofrep.com" ) ) {
const banner = document . getElementById ( 'scrollerCTA' ) ;
removeDOMElement ( banner ) ;
}
if ( window . location . href . indexOf ( "theathletic.co" ) !== - 1 ) {
else if ( matchDomain ( [ "theathletic.com" , "theathletic.co.uk" ] ) ) {
const landing _banner = document . querySelector ( '.logged-out-landing-banner' ) ;
const sample _banner = document . querySelector ( '.main-sample-banner' ) ;
const bottom _banner = document . querySelector ( '.border-bottom-cc' ) ;
@ -384,45 +383,45 @@ if (window.location.href.indexOf("theathletic.co") !== -1) {
removeDOMElement ( landing _banner , sample _banner , bottom _banner , subscribe ) ;
}
if ( window . location . href . indexOf ( "newstatesman.com" ) !== - 1 ) {
else if ( matchDomain ( "newstatesman.com" ) ) {
const tns _modal _wrapper = document . querySelector ( '.tns-modal-wrapper' ) ;
removeDOMElement ( tns _modal _wrapper ) ;
}
if ( window . location . href . indexOf ( "liberation.fr" ) !== - 1 ) {
else if ( matchDomain ( "liberation.fr" ) ) {
const close _button = document . querySelector ( '.pw-action-close' ) ;
if ( close _button )
close _button . click ( ) ;
}
if ( window . location . href . indexOf ( "estadao.com.br" ) !== - 1 ) {
else if ( matchDomain ( "estadao.com.br" ) ) {
const paywall = document . getElementById ( 'paywall-wrapper-iframe-estadao' ) ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "folha.uol.com.br" ) !== - 1 ) {
else if ( matchDomain ( "folha.uol.com.br" ) ) {
const signup = document . querySelector ( '.c-top-signup' ) ;
removeDOMElement ( signup ) ;
}
if ( window . location . href . indexOf ( "cen.acs.org" ) !== - 1 ) {
else if ( matchDomain ( "cen.acs.org" ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const meteredBar = document . querySelector ( '.meteredBar' ) ;
removeDOMElement ( meteredBar ) ;
} ) ;
}
if ( window . location . href . indexOf ( "lesechos.fr" ) !== - 1 ) {
else if ( matchDomain ( "lesechos.fr" ) ) {
const ad _block = document . querySelectorAll ( '.jzxvkd-1' ) ;
for ( let i = 0 ; i < ad _block . length ; i ++ ) {
ad _block [ i ] . setAttribute ( 'style' , 'display:none' ) ;
}
}
if ( window . location . href . indexOf ( "lc.nl" ) !== - 1 || window . location . href . indexOf ( "dvhn.nl" ) !== - 1 ) {
else if ( matchDomain ( [ "lc.nl" , "dvhn.nl" ] ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
var new _location = window . location . href ;
if ( new _location . in dexOf( "utm_source=" ) !== - 1 )
if ( new _location . in cludes( "utm_source=" ) )
var new _location = new _location . split ( '?' ) [ 0 ] ;
const preview = document . querySelector ( '.preview' ) ;
if ( preview && new _location . indexOf ( "harvest_referrer=" ) === - 1 )
@ -430,17 +429,17 @@ if (window.location.href.indexOf("lc.nl") !== -1 || window.location.href.indexOf
} ) ;
}
if ( window . location . href . indexOf ( "newyorker.com" ) !== - 1 ) {
else if ( matchDomain ( "newyorker.com" ) ) {
const paywall _bar = document . querySelector ( '.paywall-bar' ) ;
removeDOMElement ( paywall _bar ) ;
}
if ( window . location . href . indexOf ( "americanaffairsjournal.org" ) !== - 1 ) {
else if ( matchDomain ( "americanaffairsjournal.org" ) ) {
const paywall _bar = document . querySelector ( '.paywall-notification-bar-wrapper' ) ;
removeDOMElement ( paywall _bar ) ;
}
if ( window . location . href . indexOf ( 'ladepeche.fr' ) !== - 1 ) {
else if ( matchDomain ( 'ladepeche.fr' ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const hidden _section = document . querySelector ( '.article-full__body-content' ) ;
if ( hidden _section )
@ -456,6 +455,13 @@ function removeDOMElement(...elements) {
}
}
function matchDomain ( domains ) {
var hostname = window . location . hostname ;
if ( typeof domains === 'string' )
domains = [ domains ] ;
return domains . some ( domain => hostname === domain || hostname . endsWith ( '.' + domain ) ) ;
}
function removeClassesByPrefix ( el , prefix ) {
for ( let i = 0 ; i < el . classList . length ; i ++ ) {
if ( el . classList [ i ] . startsWith ( prefix ) ) {