@ -1,4 +1,4 @@
var arr _localstorage _hold = [ ] ;
var arr _localstorage _hold = [ 'sfchronicle.com' ] ;
var localstorage _hold = arr _localstorage _hold . some ( function ( url ) {
return window . location . href . indexOf ( url ) !== - 1 ;
} ) ;
@ -7,57 +7,12 @@ if (!localstorage_hold){
window . localStorage . clear ( ) ;
}
if ( window . location . href . indexOf ( "bizjournals.com" ) !== - 1 ) {
const hiddenStory = document . getElementsByClassName (
"js-pre-chunks__story-body"
) ;
if ( hiddenStory && hiddenStory . length > 0 ) {
hiddenStory [ 0 ] . style . display = "block" ;
}
const payWallMessage = document . getElementsByClassName (
"chunk chunk--flex@lg chunk--paywall"
) ;
if ( payWallMessage && payWallMessage . length > 0 ) {
payWallMessage [ 0 ] . style . display = "none" ;
}
} else if ( window . location . href . indexOf ( "businessinsider.com" ) !== - 1 ) {
const paywall = document . getElementsByClassName (
"tp-modal"
) ;
while ( paywall . length > 0 ) {
paywall [ 0 ] . parentNode . removeChild ( paywall [ 0 ] ) ;
}
} else if ( location . hostname . endsWith ( 'haaretz.co.il' ) ) {
const html = document . getElementsByTagName ( 'html' ) ;
if ( html && html . length > 0 ) {
html [ 0 ] . style [ 'overflow-y' ] = 'auto' ;
}
const msg = document . getElementById ( 'article-wrapper' ) ;
if ( msg ) {
msg . style [ 'display' ] = 'none' ;
}
} else if ( window . location . href . indexOf ( "nzherald.co.nz" ) !== - 1 ) {
const paywall = document . getElementById (
"article-content"
) ;
if ( paywall ) {
paywall . classList . remove ( 'premium-content' ) ;
paywall . classList . add ( 'full-content' ) ;
removeClassesByPrefix ( paywall , 'QUnW' ) ;
let paras = paywall . querySelectorAll ( "p, span, h2, div" ) ;
for ( let i = paras . length - 1 ; i > - 1 ; i -- ) {
removeClassesByPrefix ( paras [ i ] , 'QUnW' ) ;
paras [ i ] . classList . remove ( "ellipsis" ) ;
paras [ i ] . removeAttribute ( 'style' ) ;
// Content workarounds/domain
if ( location . hostname . endsWith ( 'rep.repubblica.it' ) ) {
if ( location . href . includes ( '/pwa/' ) ) {
location . href = location . href . replace ( '/pwa/' , '/ws/detail/' ) ;
}
}
} else if ( location . hostname . endsWith ( 'rep.repubblica.it' ) ) {
if ( location . href . includes ( "/pwa/" ) ) {
location . href = location . href . replace ( "/pwa/" , "/ws/detail/" ) ;
}
if ( location . href . includes ( "/ws/detail/" ) ) {
if ( location . href . includes ( '/ws/detail/' ) ) {
const paywall = document . querySelector ( '.paywall[subscriptions-section="content"]' ) ;
if ( paywall ) {
paywall . removeAttribute ( 'subscriptions-section' ) ;
@ -67,27 +22,35 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
}
}
}
} else if ( window . location . href . indexOf ( "wsj.com" ) !== - 1 ) {
if ( location . href . includes ( '/articles/' ) ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const paywall = document . getElementById ( 'cx-scrim' ) ;
const candybar = document . getElementById ( 'cx-candybar' ) ;
removeDOMElement ( paywall , candybar ) ;
} ) ;
/ * *
}
if ( window . location . href . indexOf ( "americanbanker.com" ) !== - 1 ) {
const paywall = document . getElementsByClassName ( 'embargo-content' ) [ 0 ] ;
if ( paywall )
paywall . classList . remove ( 'embargo-content' ) ;
}
if ( window . location . href . indexOf ( 'telegraaf.nl' ) !== - 1 ) {
setTimeout ( function ( ) {
const close _button = document . querySelector ( '.close-btn' ) ;
if ( close _button )
close _button . click ( ) ;
} , 2000 ) ;
* * /
const paywall = document . getElementById ( 'TEMPRORARY_METERING_ID' ) ;
if ( paywall ) {
window . location . reload ( true ) ;
}
} else if ( window . location . href . indexOf ( "washingtonpost.com" ) !== - 1 ) {
} , 1000 ) ; // Delay (in milliseconds)
}
if ( window . location . href . indexOf ( 'ad.nl' ) !== - 1 || window . location . href . indexOf ( 'ed.nl' ) !== - 1 ) {
let paywall = document . querySelector ( '.article__component.article__component--paywall-module-notification' ) ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "washingtonpost.com" ) !== - 1 ) {
if ( location . href . includes ( '/gdpr-consent/' ) ) {
document . querySelector ( '.gdpr-consent-container .continue-btn.button.free' ) . click ( ) ;
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 ;
@ -99,42 +62,50 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
}
}
if ( window . location . href . indexOf ( "medium.com" ) !== - 1 ) {
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 ( "wsj.com" ) !== - 1 ) {
if ( location . href . includes ( '/articles/' ) ) {
const close _button = document . querySelector ( '.close-btn' ) ;
if ( close _button )
close _button . click ( ) ;
}
}
if ( window . location . href . indexOf ( " bloombergquint.com ") !== - 1 ) {
const articlesLeftModal = document . getElementsByClassName ( 'paywall-meter-module__story-paywall-container__1UgCE' ) [ 0 ] ;
const paywall = document . getElementById ( 'paywallDmp' ) ;
removeDOMElement ( articlesLeftModal , paywall ) ;
if ( window . location . href . indexOf ( " sloanreview.mit.edu ") !== - 1 ) {
const read_more = document . querySelector ( '.btn-read-more' ) ;
if ( read _more )
read _more . click ( ) ;
}
if ( window . location . href . indexOf ( " bloomberg .com") !== - 1 ) {
if ( window . location . href . indexOf ( " mexiconewsdaily .com") !== - 1 ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const fence = document . querySelector ( '.fence-body' ) ;
if ( fence ) {
fence . classList . remove ( 'fence-body' ) ;
}
const sideNotification = document . querySelector ( '.pigeon-widget-prompt' ) ;
const subMessage = document . querySelector ( '.sub_message_container' ) ;
const popup = document . querySelector ( '.popupally-pro-outer-full-width-7-fluid_qemskqa' ) ;
const bgFocusRemoverId = document . getElementById ( 'popup-box-pro-gfcr-7' ) ;
removeDOMElement ( sideNotification , subMessage , popup , bgFocusRemoverId ) ;
} ) ;
const banner = document . getElementById ( 'paywall-banner' ) ;
removeDOMElement ( banner ) ;
}
if ( window . location . href . indexOf ( 'telegraaf.nl' ) !== - 1 ) {
setTimeout ( function ( ) {
const paywall = document . getElementById ( 'TEMPRORARY_METERING_ID' ) ;
if ( paywall ) {
window . location . reload ( true ) ;
}
} , 1000 ) ; // Delay (in milliseconds)
if ( window . location . href . indexOf ( "the-american-interest.com" ) !== - 1 ) {
const counter = document . getElementById ( 'article-counter' ) ;
removeDOMElement ( counter ) ;
}
if ( window . location . href . indexOf ( 'ad.nl' ) !== - 1 || window . location . href . indexOf ( 'ed.nl' ) !== - 1 ) {
let paywall = document . querySelector ( '.article__component.article__component--paywall-module-notification' ) ;
removeDOMElement ( paywall ) ;
if ( window . location . href . indexOf ( "nzherald.co.nz" ) !== - 1 ) {
const paywall = document . getElementById ( 'article-content' ) ;
if ( paywall ) {
const premium = document . getElementsByClassName ( 'premium-sub' ) [ 0 ] ;
removeDOMElement ( premium ) ;
paywall . classList . remove ( 'premium-content' ) ;
paywall . classList . add ( 'full-content' ) ;
removeClassesByPrefix ( paywall , 'QUnW' ) ;
let paras = paywall . querySelectorAll ( "p, span, h2, div" ) ;
for ( let i = 0 ; i < paras . length ; i ++ ) {
removeClassesByPrefix ( paras [ i ] , 'QUnW' ) ;
paras [ i ] . classList . remove ( "ellipsis" ) ;
paras [ i ] . removeAttribute ( 'style' ) ;
}
}
}
if ( window . location . href . indexOf ( "parool.nl" ) !== - 1 || window . location . href . indexOf ( "trouw.nl" ) !== - 1 || window . location . href . indexOf ( "volkskrant.nl" ) !== - 1 ) {
@ -145,6 +116,34 @@ 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 ] ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "bloomberg.com" ) !== - 1 ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const fence = document . querySelector ( '.fence-body' ) ;
if ( fence ) {
fence . classList . remove ( 'fence-body' ) ;
}
} ) ;
const banner = document . getElementById ( 'paywall-banner' ) ;
removeDOMElement ( banner ) ;
}
if ( window . location . href . indexOf ( "bloombergquint.com" ) !== - 1 ) {
const articlesLeftModal = document . getElementsByClassName ( 'paywall-meter-module__story-paywall-container__1UgCE' ) [ 0 ] ;
const paywall = document . getElementById ( 'paywallDmp' ) ;
removeDOMElement ( articlesLeftModal , paywall ) ;
}
if ( window . location . href . indexOf ( "medium.com" ) !== - 1 ) {
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 ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const hidden _section = document . getElementsByClassName ( 'article__content--restricted-media' ) [ 0 ] ;
@ -163,26 +162,38 @@ if (window.location.href.indexOf('lemonde.fr') !== -1) {
} ) ;
}
if ( window . location . href . indexOf ( "canberratimes.com.au" ) !== - 1 ) {
const paywall = document . querySelector ( '.subscribe-article.news-article-body.article__body' ) ;
paywall . classList . remove ( 'subscribe-article' ) ;
let subscribe = document . getElementsByClassName ( 'subscriber-container' ) [ 0 ] ;
removeDOMElement ( subscribe ) ;
let content = document . getElementsByClassName ( 'subscriber-hider' ) ;
for ( let i = 0 ; i < content . length ; i ++ ) {
content [ i ] . classList . remove ( 'subscriber-hider' ) ;
}
}
if ( window . location . href . indexOf ( "ledevoir.com" ) !== - 1 ) {
const counter = document . querySelector ( '.popup-msg' ) ;
removeDOMElement ( counter ) ;
}
if ( window . location . href . includes ( 'ft.com' ) ) {
const cookie _banner = document . querySelector ( '.n-messaging-banner__outer' ) ;
removeDOMElement ( cookie _banner ) ;
}
if ( window . location . href . indexOf ( "thehindu.com" ) !== - 1 ) {
const paywall = document . getElementById ( 'test' ) ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "nytimes.com" ) !== - 1 ) {
const preview _button = document . querySelector ( '.css-3s1ce0' ) ;
if ( preview _button )
preview _button . click ( ) ;
}
if ( window . location . href . indexOf ( "caixinglobal.com" ) !== - 1 ) {
const pay _tip = document . querySelectorAll ( '.cons-pay-tip' ) ;
for ( let i = 0 ; i < pay _tip . length ; i ++ ) {
pay _tip [ i ] . removeAttribute ( 'style' ) ;
}
const appContent = document . getElementById ( 'appContent' ) ;
if ( appContent ) {
const p _hidden = document . querySelectorAll ( 'p:not([style="display:block;"]' ) ;
for ( let i = 0 ; i < p _hidden . length ; i ++ ) {
p _hidden [ i ] . setAttribute ( 'style' , 'display:block;' ) ;
}
}
}
if ( window . location . href . indexOf ( "economist.com" ) !== - 1 ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const subscribe = document . querySelector ( '.subscription-proposition' ) ;
@ -198,11 +209,37 @@ if (window.location.href.indexOf("economist.com") !== -1) {
} ) ;
}
if ( window . location . href . indexOf ( "bizjournals.com" ) !== - 1 ) {
const sheet _overlay = document . querySelector ( '.sheet-overlay' ) ;
const chunk _paywall = document . querySelector ( '.chunk--paywall' ) ;
removeDOMElement ( sheet _overlay , chunk _paywall ) ;
const overlaid = document . querySelectorAll ( '.is-overlaid' ) ;
for ( let i = 0 ; i < overlaid . length ; i ++ ) {
overlaid [ i ] . classList . remove ( 'is-overlaid' ) ;
}
const body _hidden = document . querySelector ( '.js-pre-chunks__story-body' ) ;
body _hidden . removeAttribute ( 'style' ) ;
}
if ( window . location . href . indexOf ( "the-tls.co.uk" ) !== - 1 ) {
const paywall = document . querySelector ( '.tls-subscriptions-banner__closed-skin' ) ;
removeDOMElement ( paywall ) ;
}
if ( window . location . href . indexOf ( "caixinglobal.com" ) !== - 1 ) {
const pay _tip = document . querySelectorAll ( '.cons-pay-tip' ) ;
for ( let i = 0 ; i < pay _tip . length ; i ++ ) {
pay _tip [ i ] . removeAttribute ( 'style' ) ;
}
const appContent = document . getElementById ( 'appContent' ) ;
if ( appContent ) {
const p _hidden = document . querySelectorAll ( 'p:not([style="display:block;"]' ) ;
for ( let i = 0 ; i < p _hidden . length ; i ++ ) {
p _hidden [ i ] . setAttribute ( 'style' , 'display:block;' ) ;
}
}
}
if ( window . location . href . indexOf ( "nrc.nl" ) !== - 1 ) {
const paywall = document . querySelector ( '.has-paywall' ) ;
if ( paywall )
@ -212,12 +249,46 @@ if (window.location.href.indexOf("nrc.nl") !== -1) {
paywall _overlay . classList . remove ( "has-paywall-overlay" ) ;
}
if ( window . location . href . indexOf ( "theathletic.com" ) !== - 1 ) {
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' ) ;
const subscribe = document . querySelector ( '.subscribe-ad-text' ) ;
removeDOMElement ( landing _banner , sample _banner , bottom _banner , subscribe ) ;
if ( window . location . href . indexOf ( "scribd.com" ) !== - 1 ) {
const blur = document . querySelectorAll ( '.blurred_page' ) ;
for ( let i = 0 ; i < blur . length ; i ++ ) {
blur [ i ] . classList . remove ( 'blurred_page' ) ;
}
const portal = document . querySelector ( '.between_page_portal_root' ) ;
const page _module = document . querySelector ( '.between_page_module' ) ;
const promo = document . querySelector ( '.auto__doc_page_webpack_doc_page_body_static_promo_study' ) ;
const ad = document . querySelector ( '.auto__explain_scribd_v2_advertisement' ) ;
removeDOMElement ( portal , page _module , promo , ad ) ;
}
if ( window . location . href . indexOf ( "thetimes.co.uk" ) !== - 1 ) {
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 ) {
const read _story = document . querySelector ( '.storyExpanderButton' ) ;
if ( read _story )
read _story . click ( ) ;
const meter = document . querySelector ( '.meter' ) ;
removeDOMElement ( meter ) ;
}
if ( window . location . href . indexOf ( "haaretz.com" ) !== - 1 ) {
const popup = document . querySelector ( '.footer-ruler' ) ;
removeDOMElement ( popup ) ;
}
if ( window . location . href . indexOf ( "asia.nikkei.com" ) !== - 1 ) {
const popup = document . querySelector ( '.pw-widget--popup' ) ;
removeDOMElement ( popup ) ;
}
if ( window . location . href . indexOf ( "hbr.org" ) !== - 1 ) {
const popup = document . querySelector ( '.persistent-banner' ) ;
removeDOMElement ( popup ) ;
}
if ( window . location . href . indexOf ( "techinasia.com" ) !== - 1 ) {
@ -230,16 +301,6 @@ if (window.location.href.indexOf("techinasia.com") !== -1) {
removeDOMElement ( splash _subscribe , paywall _hard ) ;
}
if ( window . location . href . indexOf ( "newcastleherald.com.au" ) !== - 1 ) {
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 ( "thestar.com" ) !== - 1 ) {
const paywall = document . querySelector ( '.basic-paywall-new' ) ;
removeDOMElement ( paywall ) ;
@ -286,68 +347,109 @@ if (window.location.href.indexOf("theglobeandmail.com") !== -1) {
} ) ;
}
if ( window . location . href . indexOf ( "scribd.com" ) !== - 1 ) {
const blur = document . querySelectorAll ( '.blurred_page' ) ;
for ( let i = 0 ; i < blur . length ; i ++ ) {
blur [ i ] . classList . remove ( 'blurred_page' ) ;
if ( window . location . href . indexOf ( "newcastleherald.com.au" ) !== - 1 ) {
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' ) ;
}
const portal = document . querySelector ( '.between_page_portal_root' ) ;
const page _module = document . querySelector ( '.between_page_module' ) ;
const promo = document . querySelector ( '.auto__doc_page_webpack_doc_page_body_static_promo_study' ) ;
const ad = document . querySelector ( '.auto__explain_scribd_v2_advertisement' ) ;
removeDOMElement ( portal , page _module , promo , ad ) ;
}
if ( window . location . href . indexOf ( "technologyreview.com" ) !== - 1 ) {
const read _story = document . querySelector ( '.storyExpanderButton' ) ;
if ( read _story )
read _story . click ( ) ;
const meter = document . querySelector ( '.meter' ) ;
removeDOMElement ( meter ) ;
if ( window . location . href . indexOf ( "sofrep.com" ) !== - 1 ) {
const banner = document . getElementById ( 'scrollerCTA' ) ;
removeDOMElement ( banner ) ;
}
if ( window . location . href . indexOf ( "thetimes.co.uk" ) !== - 1 ) {
const block = document . querySelector ( '.subscription-block' ) ;
removeDOMElement ( block ) ;
if ( window . location . href . indexOf ( "theathletic.com" ) !== - 1 ) {
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' ) ;
const subscribe = document . querySelector ( '.subscribe-ad-text' ) ;
removeDOMElement ( landing _banner , sample _banner , bottom _banner , subscribe ) ;
}
if ( window . location . href . indexOf ( "haaretz.com" ) !== - 1 ) {
const popup = document . querySelector ( '.footer-rul er') ;
removeDOMElement ( popup ) ;
if ( window . location . href . indexOf ( " newstatesman .com") !== - 1 ) {
const tns_modal _wrapper = document . querySelector ( '.tns-modal-wrapp er') ;
removeDOMElement ( tns_modal _wrapper ) ;
}
if ( window . location . href . indexOf ( "asia.nikkei.com" ) !== - 1 ) {
const popup = document . querySelector ( '.pw-widget--popup' ) ;
removeDOMElement ( popup ) ;
if ( window . location . href . indexOf ( "liberation.fr" ) !== - 1 ) {
const close _button = document . querySelector ( '.pw-action-close' ) ;
if ( close _button )
close _button . click ( ) ;
}
if ( window . location . href . indexOf ( " hbr.org ") !== - 1 ) {
const p opup = document . querySelector ( '.persistent-banner ') ;
removeDOMElement ( p opup ) ;
if ( window . location . href . indexOf ( " estadao.com.br ") !== - 1 ) {
const p aywall = document . getElementById ( 'paywall-wrapper-iframe-estadao ') ;
removeDOMElement ( p aywall ) ;
}
if ( window . location . href . indexOf ( "newstatesman.com" ) !== - 1 ) {
const tns _modal _wrapper = document . querySelector ( '.tns-modal-wrapper' ) ;
removeDOMElement ( tns _modal _wrapper ) ;
if ( window . location . href . indexOf ( "folha.uol.com.br" ) !== - 1 ) {
const signup = document . querySelector ( '.c-top-signup' ) ;
removeDOMElement ( signup ) ;
}
if ( window . location . href . indexOf ( "cen.acs.org" ) !== - 1 ) {
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
const meteredBar = document . querySelector ( '.meteredBar' ) ;
removeDOMElement ( meteredBar ) ;
} ) ;
}
if ( window . location . href . indexOf ( "centralwesterndaily.com.au" ) !== - 1 ) {
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 ( "lesechos.fr" ) !== - 1 ) {
const ad _block = document . querySelectorAll ( '.jzxvkd-1' ) ;
for ( let i = 0 ; i < ad _block . length ; i ++ ) {
ad _block [ i ] . remove ( ) ;
}
}
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 ( "examiner.com.au" ) !== - 1 ) {
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' ) ;
}
}
// General Functions
function removeDOMElement ( ... elements ) {
for ( let element of elements ) {
if ( element ) element . remove ( ) ;
if ( element )
element . remove ( ) ;
}
}
function removeClassesByPrefix ( el , prefix ) {
for ( let i = el . classList . length - 1 ; i >= 0 ; i -- ) {
for ( let i = 0 ; i < el . classList . length ; i ++ ) {
if ( el . classList [ i ] . startsWith ( prefix ) ) {
el . classList . remove ( el . classList [ i ] ) ;
}
}
}
function pageContains ( selector , text ) {
const elements = document . querySelectorAll ( selector )
return Array . prototype . filter . call ( elements , function ( element ) {
return RegExp ( text ) . test ( element . textContent )
} )
function pageContains ( selector , text ) {
le t elements = document . querySelectorAll ( selector ) ;
return Array . prototype . filter . call ( elements , function ( element ) {
return RegExp ( text ) . test ( element . textContent ) ;
} ) ;
}