mirror of
https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters.git
synced 2025-12-06 06:01:59 +01:00
Release latest
This commit is contained in:
commit
f9e6ed5597
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020, magnolia1234
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
53
README.md
Normal file
53
README.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Bypass Paywalls Clean filters
|
||||
|
||||
Adblocker list which allows you to read articles from (supported) sites that implement a paywall (for a lot of sites you also need to install an userscript).\
|
||||
For some sites it will log you out (or block you to log in); caused by removing cookies or blocking general paywall-scripts.
|
||||
|
||||
Disclaimer: the list doesn't support as many sites as the extension/add-on does though (and even less on iOS).\
|
||||
On iOS you can also use [Shortcuts](https://apps.apple.com/app/shortcuts/id915249334) app with [Unpaywall](https://www.icloud.com/shortcuts/71648f5ad34f4d8f972718e5f3621ffe) shortcut for some unsupported sites.
|
||||
|
||||
### Installation
|
||||
|
||||
#### adblocker filters
|
||||
|
||||
Use a browser which supports extensions/add-ons and install an adblocker (like uBlock Origin or AdGuard).\
|
||||
Now add custom (content)filter (copy link):
|
||||
[Bypass Paywalls Clean filters](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=bpc-paywall-filter.txt)\
|
||||
Or subscribe:
|
||||
[subscribe on filterlists.com](https://filterlists.com/lists/bypass-paywalls-clean-filter) -
|
||||
[subscribe for AdGuard](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fgitflic.ru%2Fproject%2Fmagnolia1234%2Fbypass-paywalls-clean-filters%2Fblob%2Fraw%3Ffile%3Dbpc-paywall-filter.txt&title=Bypass%20Paywalls%20Clean%20filters)
|
||||
|
||||
Brave browser has only incorporated the filterlist (many sites also need userscript): enable it in [settings](brave://adblock)\
|
||||
On Android you can use [Via Browser](https://play.google.com/store/apps/details?id=mark.via.gp) which supports custom filterlists & userscripts.
|
||||
|
||||
You can also install an app like AdGuard* (on Android & iOS/macOS) or [AdLock](https://apps.apple.com/app/adlock-ads-blocker-privacy/id1506604517) (on iOS).\
|
||||
This way you can use it with Chrome/Firefox (on Android) or Safari (on iOS/macOS).
|
||||
|
||||
\* [AdGuard Content Blocker](https://play.google.com/store/apps/details?id=com.adguard.android.contentblocker) (on Android) only works with Yandex Browser or Samsung Internet Browser when you add the filter (url) to user rules (manual update of filter required).\
|
||||
Or use [AdGuard app](https://adguard.com/adguard-android/overview.html) (from their site) which works for all apps (and automatically updates filter).
|
||||
|
||||
An external app may work less effective (timing/refresh issues).\
|
||||
On iOS there may be no support for scriptlets (for removing cookies, attributes and/or classes), but works with for example AdGuard Premium (paid feature).
|
||||
|
||||
#### userscripts
|
||||
|
||||
Some fixes also require an app to run an additional userscript to work.\
|
||||
For example amp-redirect (also disable amp-to-html extension for these sites), unhide text/images and more.
|
||||
|
||||
Example apps or extensions/add-ons you can use:
|
||||
|
||||
* Android: [AdGuard app](https://adguard.com/adguard-android/overview.html) (load userscript as extension)
|
||||
* iOS: [wBlock](https://apps.apple.com/app/wblock/id6746388723) or [Tampermonkey (paid)](https://apps.apple.com/app/tampermonkey/id6738342400)
|
||||
* macOS: [AdGuard app](https://adguard.com/en/adguard-mac/overview.html)
|
||||
* Windows/ChromeOS: Tampermonkey [Chrome extension](https://chromewebstore.google.com/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) or [Firefox add-on](https://addons.mozilla.org/firefox/addon/tampermonkey)
|
||||
|
||||
Userscripts for different languages:
|
||||
|
||||
[English (& other)](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.en.user.js) -
|
||||
[Dutch](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.nl.user.js) -
|
||||
[Finnish/Swedish/Danish](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.fi.se.user.js) -
|
||||
[French](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.fr.user.js) -
|
||||
[German](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.de.user.js) -
|
||||
[Italian](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.it.user.js) -
|
||||
[Polish](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.pl.user.js) -
|
||||
[Spanish/Portugese](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.es.pt.user.js)
|
||||
835
bpc-paywall-filter.txt
Normal file
835
bpc-paywall-filter.txt
Normal file
|
|
@ -0,0 +1,835 @@
|
|||
! Title: Bypass Paywalls Clean filter
|
||||
! Expires: 1 day (update frequency)
|
||||
! Description: Filters for news sites (supports less sites than the extension/add-on)
|
||||
! Homepage: https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
! License: MIT; https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=LICENSE
|
||||
! Last modified:
|
||||
! Version: 4.2.5.1
|
||||
|
||||
! General
|
||||
|
||||
||amplitude.com^$xmlhttprequest,third-party
|
||||
||axate.io$script,third-party
|
||||
||loader.*.com/prod/*/loader.min.js$script
|
||||
||cdn.*.com/prod/*/loader.min.js$script
|
||||
||blueconic.net^$third-party
|
||||
/[a-z]{1}\d{2,3}\.\w+\.(co(m|\.uk)|net|org)\/script\.js/$script,~third-party
|
||||
||cxense.com^$script,third-party,domain=~journaldemontreal.com|~journaldequebec.com|~wsj.com
|
||||
||cxense.com^$script,domain=bizjournals.com,important
|
||||
||ensighten.com/*/Bootstrap.js$script,third-party
|
||||
||evolok.net^$third-party
|
||||
||fewcents.co/*/paywall*.js$script,third-party
|
||||
||hadrianpaywall.com^$third-party
|
||||
.de/sub/js/pc-offer-west.js$script,~third-party
|
||||
||js.matheranalytics.com^$script,third-party
|
||||
||newsmemory.com?meter$third-party
|
||||
||olytics.omeda.com^$third-party
|
||||
||onecount.net^$third-party
|
||||
||js.pelcro.com^$script,third-party
|
||||
/xbuilder/experience/execute$xmlhttprequest,~third-party,domain=~fortune.com
|
||||
||piano.io/xbuilder/experience/execute$xmlhttprequest,third-party,domain=~automobilwoche.de
|
||||
@@||piano.io^$domain=hbr.org|japantimes.co.jp
|
||||
@@||tinypass.com$script,domain=ajc.com|thelogic.co
|
||||
||api.pico.tools/client/query/*$xmlhttprequest,~third-party
|
||||
||api.pico.tools/popup/null/*$xmlhttprequest,~third-party
|
||||
gadget.pico.tools##+js(json-prune, locked)
|
||||
||poool.fr^$third-party
|
||||
||qiota.com^$xmlhttprequest,third-party
|
||||
||sophi.io^$third-party
|
||||
||steadyhq.com^$script,third-party
|
||||
||wallkit.net/js/$script,third-party
|
||||
||zephr.com/zephr-browser/$script,third-party
|
||||
/arc/subs/p.min.js$script,~third-party
|
||||
/c/assets/pigeon.js$script,~third-party
|
||||
/evolok/*ev-em.min.js$script,domain=~vikatan.com
|
||||
/evolok/*ev-widgets.min.js$script
|
||||
/paywall/evercookie_get.js$script,~third-party
|
||||
/shared-content/art/tncms/api/access.*.js$script,~third-party
|
||||
/wp-content/plugins/leaky-paywall/js/leaky-paywall-cookie.js$script,~third-party
|
||||
/wp-content/plugins/newspack-plugin/dist/*-gate-metering.js$script,~third-party
|
||||
/wp-content/*/plugins/rcp-view-limit/$script,~third-party
|
||||
/zephr/feature$xmlhttprequest
|
||||
|
||||
||abril.com.br/*/abril-paywall/$script,~third-party
|
||||
adweek.com##+js(cookie-remover, blaize_session)
|
||||
||adweek.com/wp-content/plugins/adw-zephr/$script,~third-party
|
||||
ajc.com##+js(ra, class, div.story-paygate_placeholder, stay)
|
||||
ajc.com##div.video-blocker
|
||||
ajc.com##+js(set, window.Fusion.globalContent._id, 0)
|
||||
ajc.com##+js(set, window.Fusion.globalContent.content_restrictions.content_code, 0)
|
||||
alternatives-economiques.fr###temp-paywall
|
||||
alternatives-economiques.fr##+js(ra, style, div[data-ae-poool], stay)
|
||||
ambito.com##+js(cookie-remover, TDNotesRead)
|
||||
||americanaffairsjournal.org/wp-content/mu-plugins/app/src/paywall/paywall.js$script,~third-party
|
||||
apollo-magazine.com##+js(cookie-remover, blaize_session)
|
||||
apollo-magazine.com,spectator.co.uk###subscribe-ribbon,div.ad-slot
|
||||
artforum.com##+js(cookie-remover, /^/)
|
||||
||artnet.com/paywall-ajax.php$xmlhttprequest,~third-party
|
||||
artnet.com##div.article-body:style(display:block !important;)
|
||||
artnet.com##div[id^="issuem-leaky-paywall-"]
|
||||
asia.nikkei.com##div.tp-modal,div.tp-backdrop
|
||||
asia.nikkei.com##+js(rc, tp-modal-open, body.tp-modal-open, stay)
|
||||
magazine.atavist.com##+js(set-local-storage-item, /^/, $remove$)
|
||||
||tonos.gjirafa.tech/init/access$xmlhttprequest,domain=atlantico.fr
|
||||
automobilwoche.de##+js(set, window.Fusion.globalContent._id, 0)
|
||||
automobilwoche.de##+js(set, window.Fusion.globalContent.content_restrictions, {})
|
||||
axios.com##div[data-cy="pro-paywall"],div[class^="Modal_paywall"],div[class^="Modal_cta"]
|
||||
axios.com##+js(ra, style, html[style], stay)
|
||||
bhaskar.com##div.paywallBlockedContent~div:remove()
|
||||
bhaskar.com##article div:empty
|
||||
bhaskar.com##+js(ra, class, div.paywallBlockedContent, stay)
|
||||
/\.bizjournals\.com\/.+\/(news|stories)\/.+\.html/$inline-script
|
||||
bizjournals.com##div[id^="headlessui-dialog-"],div.sheet-overlay
|
||||
! bloomberg.com: disable Dark Reader extension
|
||||
||cm.bloomberg.com^$xmlhttprequest,~third-party
|
||||
||assets.bwbx.io/s3/javelin/public/javelin/js/foundation/transporter/foundation_transporter-*.js$script,domain=bloomberg.com
|
||||
bloomberg.com##+js(ra, data-paywall-overlay-status, body[data-paywall-overlay-status], stay)
|
||||
bloomberg.com##div[id^="fortress-"]
|
||||
bloomberg.com##+js(set-local-storage-item, history, $remove$)
|
||||
||bloombergadria.com/*/news$inline-script
|
||||
bloombergadria.com##+js(ra, style, article.single-news[style], stay)
|
||||
||meter.bostonglobe.com/js/meter.js$script,~third-party
|
||||
/\.businessinsider\.com\/chunks\/scripts\/\d.+\.js/$script,domain=businessinsider.com,~third-party
|
||||
businessinsider.jp##+js(ra, hidden, div.piano-paywall-container[hidden])
|
||||
||businessoffashion.com/arc-platform-proxy.js$script,~third-party
|
||||
||businesspost.ie/api/tinypass.min.js$script,~third-party
|
||||
capital.fr##+js(ra, class|hidden, div#articleWall-paid, stay)
|
||||
capital.fr##div#articleWall-paid:style(margin-top: 40px !important;)
|
||||
capital.fr##+js(ra, class, div#articleWall, stay)
|
||||
capital.fr##div#articleWall-wrapper
|
||||
cartacapital.com.br##+js(rc, contentSoft, div.contentSoft)
|
||||
cartacapital.com.br##div[class^="s-freemium"],div.maggazine-add
|
||||
cen.acs.org##+js(cookie-remover, cenLoginP)
|
||||
cen.acs.org##.meteredBar
|
||||
challenges.fr##div.amorce.manual
|
||||
challenges.fr##+js(ra, class|hidden, .user-paying-content)
|
||||
||cdn.piano.io/api/tinypass.min.js$script,domain=clicrbs.com.br
|
||||
||clicrbs.com.br/paywall-api/count/$xmlhttprequest,~third-party
|
||||
cnbc.com##div.ArticleGate-proGate
|
||||
cnbc.com##+js(ra, class|hidden, span[hidden])
|
||||
cnn.com##div[data-component-id="subwall"]
|
||||
cnn.com##+js(ra, style, html[style], stay)
|
||||
cnn.com##+js(ra, style, body[style], stay)
|
||||
cnn.com##+js(set-local-storage-item, /reg_?wall/i, $remove$)
|
||||
columbian.com##+js(cookie-remover, blaize_session)
|
||||
columbian.com##div.modal,div#onesignal-slidedown-container
|
||||
chronicle.com,philanthropy.com##div[data-content-summary]
|
||||
chronicle.com,philanthropy.com##+js(ra, hidden|ppajfrg86rdhoubtirllb2bf1xsaknzus, div[class~="contentBody" i][hidden], stay)
|
||||
citywire.com##+js(rc, article-locked, .article-locked)
|
||||
citywire.com##+js(rc, m-article--locked, .m-article--locked)
|
||||
citywire.com##+js(rc, m-media-container--locked, .m-media-container--locked)
|
||||
citywire.com##+js(rc, m-article__body--locked, .m-article__body--locked)
|
||||
citywire.com##registration-widget,div.alert--locked
|
||||
||zonda.clarin.com^$script,domain=clarin.com|lavoz.com.ar|ole.com.ar
|
||||
||commentary.org/*/js/dg-locker-public.js$script,~third-party
|
||||
||connaissancedesarts.com/wp-content/*/vendor/iptools-jquery-inview.min.js$script,~third-party
|
||||
||paywall.correiodopovo.com.br$script,~third-party
|
||||
||corriereobjects.it/*/js/_paywall.sjs$script,domain=corriere.it
|
||||
cronista.com##+js(rc, article-body--blurred, div.article-body--blurred, stay)
|
||||
cronista.com##div.paywall-chain--show
|
||||
csmonitor.com##+js(set-local-storage-item, /^/, $remove$)
|
||||
csmonitor.com##.paywall
|
||||
cyclingnews.com##+js(rc, paywall-locker, div.paywall-locker)
|
||||
dailywire.com###post-body-text > div > div:style(height: auto !important;)
|
||||
||denik.cz/*.html$inline-script
|
||||
discovermagazine.com##body:style(overflow: auto !important;)
|
||||
discovermagazine.com##div.fIkXwQ,div[style*="fadeIn"],div[role="button"][aria-label="Dismiss Dialog"]
|
||||
||dn.se/check-paywall-v2.js,~third-party
|
||||
||dwell.com/article/*?rel=plus$inline-script
|
||||
eastwest.eu##+js(ra, style, .paywall)
|
||||
eastwest.eu##+js(rc, paywall, .paywall)
|
||||
eastwest.eu###testo_articolo > p, #testo_articolo > h3
|
||||
eastwest.eu##.offerta_abbonamenti
|
||||
||economist.com/latest/wall-ui.js$script,~third-party
|
||||
||editorialedomani.it/pelcro.js$script,~third-party
|
||||
elespanol.com##+js(rc, content-not-granted-paywall, div.content-not-granted-paywall)
|
||||
elespanol.com##div.full-suscriptor-container
|
||||
elconfidencial.com##+js(rc, newsType__content--closed, div.newsType__content--closed)
|
||||
||elobservador.com.uy/shares$xmlhttprequest,~third-party
|
||||
||elpais.com.uy/user/authStatus$script,~third-party
|
||||
||prisa.com/dist/subs/pmwall/*/pmwall.min.js$script,domain=elpais.com
|
||||
||verne.elpais.com/*.html$inline-script
|
||||
eltiempo.com##+js(rc, modulos, div.modulos)
|
||||
||eltribuno.com/scripts/Bellhop/dist/bellhop.min.js$script,~third-party
|
||||
em.com.br##+js(rc, compress-text, .div.compress-text)
|
||||
enotes.com##section#enotes-paywall
|
||||
enotes.com##+js(ra, class, div.u-paywall)
|
||||
||estadao.com.br/paywall/$script,~third-party
|
||||
||estadao.com.br/access.js$script,~third-party
|
||||
etc.se##+js(rc, teaser-section, section.teaser-section)
|
||||
etc.se##+js(rc, hidden, section.prose-feature .hidden)
|
||||
etc.se##article section.font-sans
|
||||
euobserver.com##+js(rc, show, div.membership-upsell.show)
|
||||
||exame.com/_next/static/chunks/app/%5B*.js$script,~third-party
|
||||
fieldandstream.com##div[class^="mailmunch-"]
|
||||
fieldandstream.com##+js(ra, class, html[class])
|
||||
||financialexpress.com/*/min/premiumStoryContent.js$script,~third-party
|
||||
financialexpress.com##+js(rc, paywall, .paywall)
|
||||
financialexpress.com##div.pcl-wrap
|
||||
||folha.uol.com.br/paywall/js/$script,~third-party
|
||||
||paywall.folha.uol.com.br^$script,xmlhttprequest,~third-party
|
||||
forbes.com##+js(ra, class, html[class], stay)
|
||||
forbes.com##+js(ra, class, body[class], stay)
|
||||
forbes.com.au##+js(cookie-remover, blaize_session)
|
||||
||foreignaffairs.com/modules/custom/fa_paywall_js/js/paywall.js$script,~third-party
|
||||
||foreignaffairs.com/sites/default/files/assets/css/css_*.css*delta=0$stylesheet,~third-party
|
||||
foreignaffairs.com##.article-dropcap:style(height: auto !important;)
|
||||
foreignaffairs.com##.paywall,.loading-indicator,.messages--container--bottom
|
||||
foreignpolicy.com##body:not(.is-fp-insider) div.content-ungated
|
||||
foreignpolicy.com##+js(rc, content-gated, body:not(.is-fp-insider) div.content-gated.content-gated--main-article)
|
||||
fortune.com##+js(ra, class, div.paywallActive)
|
||||
fortune.com##+js(cookie-remover, xbc)
|
||||
fortune.com##+js(cookie-remover, pcid)
|
||||
fortune.com##div.tp-container-inner
|
||||
foxnews.com##+js(ra, class, div[class*="gated-overlay"])
|
||||
foxnews.com##div.article-gating-wrapper
|
||||
||ftm.eu/js/routing$script,~third-party
|
||||
||ftm.nl/js/routing$script,~third-party
|
||||
ftm.eu,ftm.nl##+js(rc, foldable, div.foldable)
|
||||
ftm.eu,ftm.nl##div.banner-pp
|
||||
gauchazh.clicrbs.com.br##+js(ra, class, div.m-paid-content>div.hidden, stay)
|
||||
groene.nl##+js(cookie-remover, rlist)
|
||||
harpers.org##+js(cookie-remover, hr_session)
|
||||
||harpers.org/wp-content/themes/timber/static/js/modal*.js
|
||||
||cdn.tinypass.com/api/tinypass.min.js$script,domain=hbr.org
|
||||
||hilltimes.com/*/js/loadingoverlay/loadingoverlay.min.js$script,~third-party
|
||||
hindustantimes.com##div[class^="sub-paywall-version"],.closeStory
|
||||
hindustantimes.com##+js(rc, freemiumText, .freemiumText)
|
||||
hindustantimes.com##+js(rc, open-popup, body.open-popup)
|
||||
ilfattoquotidiano.it##+js(rc, cropped, article[id].cropped)
|
||||
ilfattoquotidiano.it##div#ifq-paywall-metered
|
||||
ilsole24ore.com##+js(ra, style, body[style], stay)
|
||||
ilsole24ore.com##div.s24_adb
|
||||
||inc42.com/wp-admin/admin-ajax.php|$xmlhttprequest,~third-party
|
||||
indianexpress.com##+js(ra, style, div.ev-meter-content[style])
|
||||
indianexpress.com##+js(ra, class, p.first_intro_para)
|
||||
indianexpress.com##ev-engagement
|
||||
||liveapp.inews.co.uk/*/content.html$inline-script
|
||||
inkl.com##+js(ra, class, div.paywall)
|
||||
inkl.com##div.gradient-container
|
||||
interestingengineering.com##body:style(overflow: auto !important; position: relative !important; top: unset !important)
|
||||
interestingengineering.com##main>div[class*="t-hidden"],div.t-bg-black
|
||||
irishexaminer.com/##+js(cookie-remover, blaize_session)
|
||||
japantimes.co.jp##+js(cookie-remover, xbc)
|
||||
journaldemontreal.com,journaldequebec.com##+js(rc, composer-content, div.article-main-txt.composer-content)
|
||||
journaldunet.com##div.reg_wall
|
||||
journaldunet.com##+js(ra, style, div.entry_reg_wall[style])
|
||||
||jpost.com/js/js_article.min.js$script,~third-party
|
||||
||internazionale.it/templates_js_ajax.inc.php$xmlhttprequest,~third-party
|
||||
krautreporter.de##section.js-access-wall,div.js-paywall-divider,#steady-checkout
|
||||
krautreporter.de##+js(rc, blurred, .blurred, stay)
|
||||
krautreporter.de##+js(rc, json-ld-paywall-marker, .json-ld-paywall-marker, stay)
|
||||
ksta.de,rundschau-online.de##+js(cookie-remover, anon_cookie)
|
||||
ksta.de,rundschau-online.de##+js(ra, style, div[data-article-content], stay)
|
||||
ksta.de,rundschau-online.de##div.dm-paywall-wrapper,div.dm-slot,div.dm-zephr-banner
|
||||
||cdn.tinypass.com/api/tinypass.min.js$script,domain=kurier.at
|
||||
kurier.at##+js(ra, class|style, div.paywall)
|
||||
kurier.at##div#cfs-paywall-container
|
||||
||glanacion.com/*/metering/*.js$script,domain=lanacion.com.ar
|
||||
lanacion.com.ar##+js(cookie-remover, /^metering_arc/)
|
||||
lanacion.com.ar##+js(set-local-storage-item, /^/, $remove$)
|
||||
||latimes.com/meteringjs/$script,~third-party
|
||||
||ev.lavanguardia.com$xmlhttprequest,~third-party
|
||||
lavanguardia.com,mundodeportivo.com##span.content-ad,span.hidden-ad,span.ad-unit,div.ad-div
|
||||
ledevoir.com##+js(cookie-remover, pw6)
|
||||
legrandcontinent.eu##+js(rc, paywall|pw|softwall, body)
|
||||
lejdd.fr,parismatch.com,public.fr###poool-container,#poool-widget-content,#poool-widget,.forbidden
|
||||
lejdd.fr,parismatch.com,public.fr##+js(ra, data-poool-mode, .cnt[data-poool-mode="hide"])
|
||||
||livemint.com/lm-img/subscription/$script,~third-party
|
||||
livemint.com##+js(rc, paywall, div.paywall)
|
||||
livemint.com##div[class^="storyPaywall_paywallStory_"]:remove()
|
||||
labusinessjournal.com##+js(cookie-remover, /^/)
|
||||
labusinessjournal.com###css-only-modals
|
||||
/\.emol\.cl\/(.+\/)?(pram-modal|PramModal)\.min\.js/$script,domain=lasegunda.com
|
||||
||lavoz.com.ar/sites/*/paywall/*/pw.js$script,third-party
|
||||
letelegramme.fr##+js(rc, tlg-paywalled, div.tlg-paywalled)
|
||||
loebclassics.com##+js(cookie-remover, hupLclFreeReadsCookie)
|
||||
||cdn.loeildelaphotographie.com/wp-content/*/hague-child/js/script-$script,~third-party
|
||||
loeildelaphotographie.com##+js(ra, class, .paywall)
|
||||
loeildelaphotographie.com##.premium-pic-box,.membership-promo-container,.login_form_litle
|
||||
loeildelaphotographie.com##+js(ra, style, img[style*="blur"])
|
||||
||lrb.co.uk$inline-script
|
||||
marketwatch.com##+js(cookie-remover, cX_P)
|
||||
||medscapestatic.com/*/medscape-library.js$script,domain=medscape.com
|
||||
||wbmdstatic.com/*/chunk-vendors.*.js$script,domain=medscape.com
|
||||
medscape.com##.AdUnit,div[id^="ads-"]
|
||||
mexiconewsdaily.com##+js(rc, tdb-block-inner, body.single div.td-post-content > div.tdb-block-inner)
|
||||
||motorsportmagazine.com/wp-admin/admin-ajax.php$xmlhttprequest,~third-party
|
||||
||ev.mundodeportivo.com$xmlhttprequest,~third-party
|
||||
mv-voice.com##+js(cookie-remover, /^/)
|
||||
||cdn.registerdisney.go.com$script,domain=nationalgeographic.com
|
||||
||nautil.us/wp-content/themes/*/js/js.cookie.min.js$script,~third-party
|
||||
||loader.newsday.com$script,~third-party
|
||||
newsday.com##+js(ra, class, html[class])
|
||||
newrepublic.com##div.article-scheduled-modal
|
||||
||blink.net/*/blink-sdk.js$script,domain=newrepublic.com|thebaffler.com
|
||||
||townnews.com/*/tncms/*/scripts/engage.min.js$script,third-party,domain=nola.com|shreveportbossieradvocate.com|theadvocate.com
|
||||
nrc.nl##+js(cookie-remover, counter)
|
||||
||nrc.nl/paywall-api/api/zephr$xmlhttprequest,~third-party
|
||||
nrc.nl##div[id$="modal__overlay"],div.header__subscribe-bar,div.banner
|
||||
||nsctotal.com.br/wp-content/themes/nsctotal/js/paywall.min.js$script,~third-party
|
||||
||nybooks.com/wp-admin/admin-ajax.php$xmlhttprequest,~third-party
|
||||
nybooks.com##+js(rc, paywall-article, .paywall-article)
|
||||
nybooks.com##div.toast-cta
|
||||
||nysun.com/api/zephr/$xmlhttprequest,~third-party
|
||||
||meter-svc.nytimes.com/meter.js$xmlhttprequest,~third-party
|
||||
||nytimes.com/svc/onsite-messaging/query$xmlhttprequest,~third-party
|
||||
||mwcm.nyt.com/$script,domain=nytimes.com
|
||||
nytimes.com##div[data-testid="inline-message"],div[id^="ad-"],div#dock-container,div.pz-ad-box
|
||||
||cooking.nytimes.com/api/*/access$xmlhttprequest,~third-party
|
||||
||nzherald.co.nz/zephr/$xmlhttprequest,~third-party
|
||||
nzherald.co.nz##+js(set, window.Fusion.globalContent.isPremium, false)
|
||||
nzz.ch,themarket.ch##+js(rc, nzzinteraction, .nzzinteraction, stay)
|
||||
nzz.ch##+js(ra, class, div.barrier, stay)
|
||||
||cdn.piano.io/api/tinypass.min.js$script,domain=nzz.ch|themarket.ch
|
||||
||tms.danzz.ch/scripts/t.min.js$script,domain=nzz.ch|themarket.ch
|
||||
||observador.pt/wp-content/*/paywall-price-*.js$script,~third-party
|
||||
paloaltoonline.com##+js(cookie-remover, /^/)
|
||||
||pastemagazine.com/wp-content/cache/autoptimize/js/autoptimize_*.js$script,~third-party
|
||||
pb.pl##+js(ra, class, section.o-article-content, stay)
|
||||
pb.pl##div.o-piano-template-loader-box
|
||||
pourleco.com##+js(ra, style, div[class*="article-"][style])
|
||||
pourleco.com##div[data-pleco-poool^="paywall"],div[data-pleco-transition="fade"]
|
||||
philosophynow.org##+js(cookie-remover, /^/)
|
||||
profil.at##+js(ra, class|style, div.paywall)
|
||||
profil.at##div#cfs-paywall-container,div.consentOverlay
|
||||
||kinja-static.com/assets/*/regwalled-content.*.js$script,domain=qz.com
|
||||
||reviewjournal.com/wp-content/plugins/*/loader_prod.min.js$script,~third-party
|
||||
||revistaoeste.com/wp-content/*/js/app.*.js$script,~third-party
|
||||
||revistaoeste.com/revista/$inline-script
|
||||
revistaoeste.com##+js(ra, class, div.loading_content)
|
||||
revistaoeste.com##+js(rc, expandable, div.expandable)
|
||||
revistaoeste.com##svg.spinner-eclipse
|
||||
/\.rugbypass\.com\/plus\/\w/$inline-script,domain=rugbypass.com
|
||||
rugbypass.com##.plus-article-offer
|
||||
rugbypass.com##+js(rc, premium-fold-bottom, .premium-fold-bottom)
|
||||
rugbypass.com##+js(rc, fade, .fade)
|
||||
scholastic.com##+js(ra, class, body.modal-open, stay)
|
||||
scholastic.com##div.paywallModalElement,div.modal-backdrop
|
||||
schwaebische.de##+js(ra, style, body[style], stay)
|
||||
science.org##div.alert-read-limit
|
||||
science.org##+js(rc, alert-read-limit__overlay, body.alert-read-limit__overlay, stay)
|
||||
sciencenews.org##+js(cookie-remover, blaize_session)
|
||||
sciencesetavenir.fr##div.amorce.manual
|
||||
sciencesetavenir.fr##+js(ra, class|hidden, .user-paying-content)
|
||||
||scientificamerican.com/api/tinypass.min.js$script,~third-party
|
||||
scientificamerican.com##+js(cookie-remover, article_meter)
|
||||
scotsman.com,yorkshirepost.co.uk##+js(rc, premium|no-entitlement, div.premium.no-entitlement)
|
||||
||seattletimes.com/wp-content/*/st-advertising-bundle.js$script,~third-party
|
||||
||seattletimes.com/wp-content/*/st-user-messaging-main-bundle.js$script,~third-party
|
||||
||sfstandard.com/zephr/$xmlhttprequest,~third-party
|
||||
||sfstandard.com/api/content/decision/$xmlhttprequest,~third-party
|
||||
sfstandard.com##+js(cookie-remover, zephr-session)
|
||||
sfstandard.com##+js(acis, localStorage)
|
||||
sfstandard.com##+js(acis, sessionStorage)
|
||||
sfstandard.com##div.sticky
|
||||
slideshare.net##+js(rc, limit-overlay, .limit-overlay)
|
||||
slideshare.net##+js(set-local-storage-item, /^/, $remove$)
|
||||
sofrep.com##+js(cookie-remover, sofrep_news_ids)
|
||||
sofrep.com##+js(ra, class, div.paywall)
|
||||
sofrep.com##+js(rc, fader, div.fader)
|
||||
sofrep.com##div.non-paywall,div#paywall_wrap
|
||||
spektrum.de##+js(rc, pw-premium, article.pw-premium)
|
||||
spglobal.com##+js(cookie-remover, count)
|
||||
startribune.com##div.modal-backdrop
|
||||
startribune.com##body[class]:style(overflow: auto !important; position: static !important;)
|
||||
||stereogum.com/_next/static/chunks/pages/*/%5B*.js$script,~third-party
|
||||
study.com##+js(ra, class, div.faded-content)
|
||||
study.com##+js(ra, class, div.hidden[ng-non-bindable])
|
||||
study.com##div.article-cutoff-div
|
||||
||suomensotilas.fi/wp-content/plugins/epflpw/js/pw.js$script,~third-party
|
||||
suomensotilas.fi##+js(rc, epfl-pw-obscured, div.epfl-pw-obscured)
|
||||
||telegraph.co.uk/martech/js/$script,~third-party
|
||||
tes.com##+js(cookie-remover, /tg_paywall/)
|
||||
tes.com##+js(ra, class, div.tg-paywall-body-overlay)
|
||||
tes.com##div.js-paywall-info,div.tg-paywall-message
|
||||
||texasmonthly.com/script.js$script,~third-party
|
||||
texasmonthly.com##div.promo-in-body
|
||||
the-scientist.com##+js(rc, paywall, div.paywall)
|
||||
the-scientist.com##div.gated-fader,div#Modal
|
||||
||theartnewspaper.com/_next/static/chunks/pages/access-allowed-*.js$script,~third-party
|
||||
||theatlantic.com/zephr/decision-engine$xmlhttprequest,~third-party
|
||||
theatlantic.com##aside#paywall,div[class^="LostInventoryMessage_"]
|
||||
||cloudfunctions.net/gated-countView$xmlhttprequest,domain=thediplomat.com
|
||||
theglobeandmail.com##+js(set, window.Fusion.globalContent._id, 0)
|
||||
thehindu.com,thehindubusinessline.com##+js(set, window.Adblock, false)
|
||||
thehindu.com,thehindubusinessline.com##+js(set, window.isNonSubcribed, false)
|
||||
||theintercept.com$inline-script
|
||||
thelampmagazine.com##+js(ra, class, div.paywall-gradient)
|
||||
thelampmagazine.com##section.p-8
|
||||
thelogic.co##+js(cookie-remover, firstarticle)
|
||||
||thenewatlantis.com/*/thenewatlantis/js/gate.js$script,~third-party
|
||||
||thenewatlantis.com/*/thenewatlantis/js/donate.js$script,~third-party
|
||||
thenewworld.co.uk##div[data-show-fade-on-noaccess],div[data-show-subs-blocked]
|
||||
thenewworld.co.uk##+js(ra, data-show-has-access, div[data-show-has-access])
|
||||
thepointmag.com##+js(cookie-remover, monthly_history)
|
||||
thepointmag.com##div.overlay,div#tpopup-
|
||||
thequint.com##div.zsqcu
|
||||
thequint.com##+js(ra, class|style, div#story-body-wrapper, stay)
|
||||
||thesaturdaypaper.com.au/sites/all/modules/custom/node_meter/pw.js$~third-party
|
||||
/\.thesaturdaypaper\.com\.au\/.+\/(\w+-){3,}/$inline-script,domain=thesaturdaypaper.com.au
|
||||
thesaturdaypaper.com.au##div.paywall-hard-always-show
|
||||
thespectator.com##+js(rc, ev-meter-content-class, div.ev-meter-content-class)
|
||||
thetimes.com##html:style(overflow: auto !important;)
|
||||
thetimes.com##body:style(overflow: auto !important;)
|
||||
thetimes.com##+js(rc, TeaserPage, body.TeaserPage)
|
||||
theweek.com##+js(rc, paywall-locker, div.paywall-locker)
|
||||
theweek.com##div.kiosq-main-layer
|
||||
thewrap.com##+js(cookie-remover, blaize_session)
|
||||
timeshighereducation.com##+js(rc, paywall-fade, div.paywall-fade)
|
||||
timeshighereducation.com##div.paywall-active
|
||||
unherd.com##+js(ra, id, div#premiumcontent)
|
||||
unherd.com##div#premiumpreview
|
||||
valeursactuelles.com##div.qiota
|
||||
valeursactuelles.com##+js(ra, class, div.qiota_reserve, stay)
|
||||
/\.vn\.at\/.+\/\d{4}\//$inline-script,domain=vn.at
|
||||
||washingtonpost.com/*/tetro-client/$script,~third-party
|
||||
||account.winnipegfreepress.com/api/v*/auth/identify$xmlhttprequest,~third-party
|
||||
winnipegfreepress.com##.billboard-ad-space,.ad,.article-ad,.fixed-sky
|
||||
||ynet.co.il/*/article/*?rel=plus$inline-script
|
||||
|
||||
! Advance Local
|
||||
al.com,cleveland.com,lehighvalleylive.com,masslive.com,mlive.com,nj.com,oregonlive.com,pennlive.com,silive.com,syracuse.com##+js(rc, article__paragraph--blur, .article__paragraph--blur, stay)
|
||||
al.com,cleveland.com,lehighvalleylive.com,masslive.com,mlive.com,nj.com,oregonlive.com,pennlive.com,silive.com,syracuse.com##+js(set, window.adiData.entryTags, 0)
|
||||
|
||||
! Australian Community Media
|
||||
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,standard.net.au,theadvocate.com.au,thecourier.com.au,westernadvocate.com.au##+js(rc, subscribe-truncate, .subscribe-truncate)
|
||||
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,standard.net.au,theadvocate.com.au,thecourier.com.au,westernadvocate.com.au##+js(rc, subscriber-hider, .subscriber-hider)
|
||||
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,standard.net.au,theadvocate.com.au,thecourier.com.au,westernadvocate.com.au##+js(rc, hidden, div.flex-col div.hidden, stay)
|
||||
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,standard.net.au,theadvocate.com.au,thecourier.com.au,westernadvocate.com.au##+js(ra, style, html[style], stay)
|
||||
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,standard.net.au,theadvocate.com.au,thecourier.com.au,westernadvocate.com.au##+js(ra, style, body[style], stay)
|
||||
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,standard.net.au,theadvocate.com.au,thecourier.com.au,westernadvocate.com.au##+js(ra, class, div[class^="gradient-mask-"], stay)
|
||||
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,standard.net.au,theadvocate.com.au,thecourier.com.au,westernadvocate.com.au##div.blocker,.story-generic__iframe,div.transition-all,div[id^="headlessui-dialog"]
|
||||
|
||||
! Arizent
|
||||
accountingtoday.com,americanbanker.com,benefitnews.com,bondbuyer.com,dig-in.com,financial-planning.com,nationalmortgagenews.com##+js(set, window.contentGating.ungate, true)
|
||||
|
||||
! Condé Nast
|
||||
/\.com\/[-\w]+$/$script,~third-party,domain=architecturaldigest.com|bonappetit.com|cntraveler.com|epicurious.com|gq.com|newyorker.com|vanityfair.com|vogue.com|wired.com
|
||||
/www\.vogue\.co\.uk\/[-\w]+$/$script,~third-party
|
||||
||voguebusiness.com/journey/compiler/build-*.js$script,~third-party
|
||||
voguebusiness.com##+js(cookie-remover, userId)
|
||||
|
||||
! Crain Communications
|
||||
adage.com,autonews.com,pionline.com##+js(set, window.Fusion.globalContent._id, 0)
|
||||
adage.com,autonews.com,pionline.com##+js(set, window.Fusion.globalContent.content_restrictions, {})
|
||||
.com/profiles/*/crain_pelcro_user.js$script,~third-party,domain=360dx.com|chicagobusiness.com|crainscleveland.com|crainsdetroit.com|crainsgrandrapids.com|crainsnewyork.com|genomeweb.com|modernhealthcare.com|plasticsnews.com|precisionmedicineonline.com|sustainableplastics.com|tirebusiness.com|utech-polyurethane.com
|
||||
.com/*/js_$script,~third-party,domain=rubbernews.com
|
||||
rubbernews.com##+js(ra, class, body[class], stay)
|
||||
european-rubber-journal.com##+js(rc, truncated, div.truncated)
|
||||
european-rubber-journal.com##div.article-overlay,div.gradient
|
||||
modernhealthcare.com##+js(rc, sponsored-article, div.sponsored-article)
|
||||
|
||||
! Daily Mail Group UK
|
||||
dailymail.co.uk,mailonsunday.co.uk,thisismoney.co.uk##+js(rc, is-paywalled-article, body.is-paywalled-article)
|
||||
||dailymail.co.uk/static/mol-adverts/$script
|
||||
|
||||
! GEDI.it sites
|
||||
||huffingtonpost.it/*/news/$inline-script
|
||||
||lastampa.it/*/news/$inline-script
|
||||
huffingtonpost.it,lastampa.it##+js(cookie-remover, blaize_session)
|
||||
huffingtonpost.it,lastampa.it##aside#widgetDP,div[id^="adv"]
|
||||
||scripts.repubblica.it/pw/pw.js$script,domain=italian.tech|moda.it
|
||||
italian.tech,moda.it##div#ph-paywall:remove()
|
||||
italian.tech,moda.it##+js(ra, style, div#article-body, stay)
|
||||
|
||||
! Groupe La Dépêche
|
||||
centrepresseaveyron.fr,journaldemillau.fr,ladepeche.fr,lindependant.fr,midilibre.fr,nrpyrenees.fr,petitbleu.fr,rugbyrama.fr##+js(ra, style|data-state, div.p402_premium)
|
||||
centrepresseaveyron.fr,journaldemillau.fr,ladepeche.fr,lindependant.fr,midilibre.fr,nrpyrenees.fr,petitbleu.fr,rugbyrama.fr##div.paywall
|
||||
|
||||
! Groupe SudOuest.fr
|
||||
sudouest.fr,charentelibre.fr,larepubliquedespyrenees.fr##div.article-premium-footer,div.footer-premium,div.article-body-wrapper.visible-not-premium,div.pub,div.ph-easy-subscription
|
||||
sudouest.fr,charentelibre.fr,larepubliquedespyrenees.fr##+js(rc, visible-premium, div.visible-premium)
|
||||
|
||||
! Groupe Nice-Matin
|
||||
||nicematin.com/build/js/viewpay.*.js$script,domain=monacomatin.mc|nicematin.com|varmatin.com
|
||||
|
||||
! Grupo El Comercio
|
||||
||diariocorreo.pe/pf/dist/engine/react.js$script,~third-party
|
||||
||elcomercio.pe/pf/dist/engine/react.js$script,~third-party
|
||||
||gestion.pe/pf/dist/engine/react.js$script,~third-party
|
||||
diariocorreo.pe,elcomercio.pe,gestion.pe##+js(ra, class|style, .paywall)
|
||||
diariocorreo.pe,elcomercio.pe,gestion.pe##+js(rc, story-contents--fade, p.story-contents--fade)
|
||||
diariocorreo.pe,elcomercio.pe,gestion.pe##div[class^="content_gpt"]
|
||||
|
||||
! Grupo El Mercurio
|
||||
||elmercurio.com/assets/js/merPramV2.js$script,~third-party
|
||||
||elmercurio.com/assets/js/vendor/modal.js$script,~third-party
|
||||
||emol.cl/assets/js/merPramV2.js$script,domain=elmercurio.com
|
||||
||emol.cl/assets/js/vendor/modal.js$script,domain=elmercurio.com
|
||||
elmercurio.com##+js(rc, lessreadmore, article.lessreadmore, stay)
|
||||
elmercurio.com##div[id*="bt_readmore_"]
|
||||
||australvaldivia.cl/impresa/*/assets/vendor.js$script,~third-party
|
||||
||mercuriovalpo.cl/impresa/*/assets/vendor.js$script,~third-party
|
||||
||pasedigital.cl/API/User/Status$script,domain=australvaldivia.cl|mercuriovalpo.cl
|
||||
|
||||
! Grupo Prensa Ibérica
|
||||
diaridegirona.cat,diariocordoba.com,diariodeibiza.es,diariodemallorca.es,elcorreogallego.es,elcorreoweb.es,eldia.es,elperiodico.com,elperiodicodearagon.com,elperiodicoextremadura.com,elperiodicomediterraneo.com,epe.es,farodevigo.es,informacion.es,laopinioncoruna.es,laopiniondemalaga.es,laopiniondemurcia.es,laopiniondezamora.es,laprovincia.es,levante-emv.com,lne.es,mallorcazeitung.es,regio7.cat,superdeporte.es##+js(rc, ft-helper-closenews, p.ft-helper-closenews, stay)
|
||||
|
||||
! Gruppo SAE
|
||||
gazzettadimodena.it,gazzettadireggio.it,iltirreno.it,lanuovaferrara.it,lanuovasardegna.it##+js(cookie-remover, /__mtr$/)
|
||||
gazzettadimodena.it,gazzettadireggio.it,iltirreno.it,lanuovaferrara.it,lanuovasardegna.it##div.MuiSnackbar-root
|
||||
|
||||
! Hearst Communications (magazines)
|
||||
.com/_assets/jam/$script,~third-party,domain=bicycling.com|cosmopolitan.com|countryliving.com|delish.com|elle.com|elledecor.com|esquire.com|goodhousekeeping.com|harpersbazaar.com|housebeautiful.com|menshealth.com|oprahdaily.com|popularmechanics.com|prevention.com|roadandtrack.com|runnersworld.com|townandcountrymag.com|womenshealthmag.com
|
||||
|
||||
! Hearst Communications (newspapers)
|
||||
ctpost.com,expressnews.com,houstonchronicle.com,nhregister.com,sfchronicle.com,statesman.com,timesunion.com##div#mod-target-div
|
||||
ctpost.com,expressnews.com,houstonchronicle.com,nhregister.com,sfchronicle.com,statesman.com,timesunion.com##body:style(overflow: visible!important)
|
||||
|
||||
! Il Messaggero (+ regional)
|
||||
||cedscdn.it/*/PaywallMeter.js$script,domain=corriereadriatico.it|ilgazzettino.it|ilmattino.it|ilmessaggero.it|quotidianodipuglia.it
|
||||
||cedsdigital.it/*/PaywallMeter.js$script,domain=corriereadriatico.it|ilgazzettino.it|ilmattino.it|ilmessaggero.it|quotidianodipuglia.it
|
||||
corriereadriatico.it,ilgazzettino.it,ilmattino.it,ilmessaggero.it,quotidianodipuglia.it##+js(ra, subscriptions-section, [subscriptions-section="content"])
|
||||
corriereadriatico.it,ilgazzettino.it,ilmattino.it,ilmessaggero.it,quotidianodipuglia.it##[subscriptions-section="content-not-granted"]
|
||||
|
||||
! Industry Dive
|
||||
||*dive.com/static/js/dist/contentGate.bundle.js$script,~third-party
|
||||
.com/static/js/dist/contentGate.bundle.js$script,~third-party,domain=cfo.com|pharmavoice.com|proformative.com|socialmediatoday.com
|
||||
|
||||
! Landwirtschaftsverlag
|
||||
profi.de,topagrar.com,wochenblatt.com##+js(ra, class|style, div.paywall-full-content[style])
|
||||
profi.de,wochenblatt.com##div.m-paywall__textFadeOut,div[id^="paymentprocess-"]
|
||||
||topagrar.com/*/news/$inline-script
|
||||
topagrar.com##div.paywall-package
|
||||
|
||||
! Madsack sites
|
||||
cz.de,dewezet.de,dieharke.de,dnn.de,gnz.de,goettinger-tageblatt.de,haz.de,kn-online.de,landeszeitung.de,ln-online.de,lvz.de,maz-online.de,ndz.de,neuepresse.de,op-marburg.de,ostsee-zeitung.de,paz-online.de,remszeitung.de,rga.de,rnd.de,saechsische.de,siegener-zeitung.de,szlz.de,sn-online.de,solinger-tageblatt.de,tah.de,torgauerzeitung.de,waz-online.de##+js(set, window.Fusion.globalContent.isPaid, false)
|
||||
|
||||
! Maine Trust for Local News
|
||||
||bc.*.com/script.js$script,~third-party,domain=centralmaine.com|pressherald.com|sunjournal.com
|
||||
|
||||
! McClatchy Group
|
||||
||mcclatchy.com/mcc-paywall.js$script,third-party
|
||||
|
||||
! Mediahuis Belgie
|
||||
/extra/assets/resources/js/zephrIntegration.js$script,~third-party,domain=gva.be|hbvl.be|nieuwsblad.be|standaard.be
|
||||
|
||||
! Mediahuis Noord
|
||||
||ndcmediagroep.nl/js/evolok/$script,third-party
|
||||
|
||||
! MediaNews Group & Tribune Publishing Company
|
||||
.com/wp-content/plugins/loader-wp/static/loader.min.js$script,~third-party
|
||||
bostonherald.com,denverpost.com,eastbaytimes.com,mercurynews.com,ocregister.com,pressenterprise.com,sandiegouniontribune.com,twincities.com##+js(ra, subscriptions-section, [subscriptions-section="content"])
|
||||
bostonherald.com,denverpost.com,eastbaytimes.com,mercurynews.com,ocregister.com,pressenterprise.com,sandiegouniontribune.com,twincities.com##[subscriptions-section="content-not-granted"]
|
||||
|
||||
! Motor Presse Stuttgart
|
||||
.de/thenewsbar/config/$xmlhttprequest,~third-party,domain=aerokurier.de|auto-motor-und-sport.de|flugrevue.de|motorradonline.de|womenshealth.de
|
||||
|
||||
! Oahu Publications
|
||||
staradvertiser.com##div.fade
|
||||
staradvertiser.com##+js(ra, style, div#hsa-paywall-content[style], stay)
|
||||
staradvertiser.com##+js(rc, overflow-hidden, body.overflow-hidden, stay)
|
||||
|
||||
hawaiitribune-herald.com,thegardenisland.com,westhawaiitoday.com##+js(ra, style, div#single-paywall, stay)
|
||||
hawaiitribune-herald.com,thegardenisland.com,westhawaiitoday.com##div#single-login-box,div#single-excerpt
|
||||
|
||||
! Persgroep
|
||||
/temptation/resolve$xmlhttprequest,~third-party,domain=demorgen.be|flair.nl|humo.be|libelle.nl|margriet.nl|parool.nl|trouw.nl|volkskrant.nl
|
||||
||temptation.*/temptation.js$script,~third-party,domain=demorgen.be|flair.nl|humo.be|libelle.nl|margriet.nl|parool.nl|trouw.nl|volkskrant.nl
|
||||
@@||myprivacy-static.dpgmedia.net/consent.js$script,third-party
|
||||
@@/wrapperMessagingWithoutDetection.js$script,~third-party,domain=demorgen.be|flair.nl|humo.be|libelle.nl|margriet.nl|parool.nl|trouw.nl|volkskrant.nl
|
||||
|
||||
! DPG ADR (no scroll)
|
||||
||temptation.*/temptation.js$script,~third-party,domain=ad.nl|bd.nl|bndestem.nl|destentor.nl|ed.nl|gelderlander.nl|pzc.nl|tubantia.nl|hln.be
|
||||
||temptation.*/rest/$xmlhttprequest,~third-party,domain=ad.nl|bd.nl|bndestem.nl|destentor.nl|ed.nl|gelderlander.nl|pzc.nl|tubantia.nl|hln.be
|
||||
|
||||
! Ringier Axel Springer Polska
|
||||
auto-swiat.pl,businessinsider.com.pl,forbes.pl,komputerswiat.pl,newsweek.pl,onet.pl##+js(ra, class|style, div.contentPremium[style])
|
||||
businessinsider.com.pl##div#content-premium-offer
|
||||
|
||||
! Roularta Media Groep
|
||||
||artsenkrant.com/js/responsive/rmgModal.js$script,~third-party
|
||||
||artsenkrant.com/js/responsive/rmgPaywall.js$script,~third-party
|
||||
artsenkrant.com##div.article-body > p
|
||||
artsenkrant.com##+js(ra, class, div.article-body > div)
|
||||
artsenkrant.com##+js(rc, locked, body.locked)
|
||||
artsenkrant.com,femmesdaujourdhui.be,flair.be,knack.be,kw.be,levif.be,libelle.be##div[id*="wall-modal"]
|
||||
artsenkrant.com,femmesdaujourdhui.be,flair.be,knack.be,kw.be,levif.be,libelle.be##+js(ra, class|style, html, stay)
|
||||
beleggersbelangen.nl##+js(rc, no-account, div.no-account)
|
||||
beleggersbelangen.nl##+js(ra, style, div.content-inner[style])
|
||||
beleggersbelangen.nl##div.unlimited-access
|
||||
!#if (env_firefox)
|
||||
/\.(femmesdaujourdhui|flair|knack|levif|libelle)\.be\/.+\/(\w+-){2,}/$inline-script
|
||||
!#endif
|
||||
|
||||
! Südwest Media Network
|
||||
schwarzwaelder-bote.de,stuttgarter-nachrichten.de,stuttgarter-zeitung.de##+js(rc, restricted-area, div.restricted-area, stay)
|
||||
schwarzwaelder-bote.de,stuttgarter-nachrichten.de,stuttgarter-zeitung.de##div.mod-paywall
|
||||
|
||||
! Tamedia.ch Group
|
||||
24heures.ch,bazonline.ch,derbund.ch,tagesanzeiger.ch,tdg.ch##+js(cookie-remover, xbc)
|
||||
|
||||
! TechTarget sites
|
||||
computerweekly.com,lemagit.fr,techtarget.com##+js(rc, paywall, div.paywall, stay)
|
||||
computerweekly.com,lemagit.fr,techtarget.com##p#firstP,div#inlineRegistrationWrapper
|
||||
|
||||
! The Epoch Times sites (main + br|cz|de|fr|il|jp|ro)
|
||||
||theepochtimes.com/rules/get$xmlhttprequest,~third-party
|
||||
||epochbase.com/libs/paywall*.js$script,third-party
|
||||
||epochbase.com/rules/get$xmlhttprequest,third-party
|
||||
||epochbase.eu/rules/get$xmlhttprequest,third-party
|
||||
/\/epoch\.org\.il\/.+\/\d{5,}\//$inline-script,domain=epoch.org.il
|
||||
|
||||
! The Local Group (EU)
|
||||
thelocal.at,thelocal.ch,thelocal.com,thelocal.de,thelocal.dk,thelocal.es,thelocal.fr,thelocal.it,thelocal.no,thelocal.se##+js(ra, style, div#articleBody, stay)
|
||||
thelocal.at,thelocal.ch,thelocal.com,thelocal.de,thelocal.dk,thelocal.es,thelocal.fr,thelocal.it,thelocal.no,thelocal.se##p#articleBodyForbidden,div.tl-ad-container,div.ml-manual-widget-container
|
||||
|
||||
! additional adblocker-fix
|
||||
||flowerstreatment.com^$third-party
|
||||
||guidecent.com^$script,third-party
|
||||
||memberstack.com/scripts/v*/memberstack.js$script,third-party
|
||||
policorner.ca##div.free-text,div.subscribe-box
|
||||
/wp-content/plugins/incognito_dectector/$script,~third-party
|
||||
|
||||
||jeuneafrique.com/cdn-cgi/trace$xmlhttprequest,~third-party
|
||||
||assets.guim.co.uk/assets/SignInGate*.js$script,domain=theguardian.com
|
||||
theguardian.com##[name="SlotBodyEnd"],div[data-cy="contributions-liveblog-epic"]
|
||||
|
||||
@@||consentmanager.net$script,third-party
|
||||
#@#.cmpwrapper
|
||||
@@||cookielaw.org^$xmlhttprequest,domain=blick.ch
|
||||
@@||sdk.privacy-center.org^$script,third-party
|
||||
@@/wrapperMessagingWithoutDetection.js$script,~third-party,domain=handelsblatt.com
|
||||
!##div#didomi-host
|
||||
##+js(rc, didomi-popup-open, body.didomi-popup-open)
|
||||
||htlbid.com$script,third-party
|
||||
|
||||
! flip-pay
|
||||
||flip-pay.com/*/flip-pay.js$script,third-party,domain=clareecho.ie|thedailymash.co.uk
|
||||
clareecho.ie##+js(rc, td-post-content, div.td-post-content)
|
||||
|
||||
! Wallkit
|
||||
##+js(ra, class, div.wkwp-paywall)
|
||||
##div.wkwp-paywall-block
|
||||
|
||||
! custom sites
|
||||
.com/webfiles/*/js/metering.js$script,third-party,domain=hbook.com|libraryjournal.com|slj.com
|
||||
20minutes.fr##+js(rc, qiota_reserve, div.qiota_reserve)
|
||||
||20minutes.fr/v-ajax/subscribe-modal$xmlhttprequest,~third-party
|
||||
aaii.com##+js(rc, fadeout, .fadeout)
|
||||
aaii.com##.greybox-signup
|
||||
aftenposten.no##div.hyperion-css-1cc2qe9,div[class^="advertory-"],button[aria-controls="summary-details"]
|
||||
aftenposten.no##body:style(overflow: auto !important)
|
||||
aftenposten.no##+js(ra, class, div#summary-details)
|
||||
amboss.com##+js(cookie-remover, ssobma)
|
||||
amboss.com##div#optly-remaining-articles-banner,div[class^="InfoBanner_InfoBanner"]
|
||||
||anandabazar.com/subscription-assets/js/paywall*.js$script,~third-party
|
||||
||anandabazar.com/*/cid/$inline-script
|
||||
anandabazar.com##div.paywallouterbox,div.readarticlebox,div.showmorebox
|
||||
anandabazar.com##+js(ra, class, div.readmoreouterbox, stay)
|
||||
anandabazar.com##+js(ra, id, article#outerboxarticlebox, stay)
|
||||
anandabazar.com##+js(ra, class, div.expcontainer, stay)
|
||||
||tinypass.com/api/tinypass.min.js$script,domain=arabianbusiness.com
|
||||
arabianbusiness.com##+js(ra, class, div.ev-meter-content, stay)
|
||||
||arktimes.com/wp-content/plugins/newspack-plugin/dist/memberships-gate-metering.js$script,~third-party
|
||||
||atribuna.com.br/assets/js-v*/story.js$script,~third-party
|
||||
babi.sh##+js(ra, style, div[style*="filter:blur"], stay)
|
||||
babi.sh##+js(ra, style, div[style*="; overflow: hidden"][style*="; height:"], stay)
|
||||
babi.sh##div[style="width: 100%; opacity: 1; transform: none;"]
|
||||
bisnow.com##+js(ra, style, div.story-container > p[style], stay)
|
||||
bisnow.com##div.storyLogin
|
||||
bizwest.com##div.fp-paywall
|
||||
bizwest.com##+js(ra, class, div.fp-content)
|
||||
boredpanda.com##+js(rc, open-list-items, div.open-list-items)
|
||||
boredpanda.com##div#show-all-images-block-premium
|
||||
||boston.com/api/tinypass.min.js$script,~third-party
|
||||
brainly.com,brainly.com.br##+js(set-local-storage-item, /^/, $remove$)
|
||||
||account.brandonsun.com/api/v*/auth/identify$xmlhttprequest,~third-party
|
||||
brusselstimes.com##+js(ra, style, div[style*="height: 0;"], stay)
|
||||
businessden.com,richmondbizsense.com##+js(ra, class, div.cp-paywall-user)
|
||||
businessden.com,richmondbizsense.com##div#copperpress-paywall
|
||||
businesstoday.in##+js(cookie-remover, magazineSession)
|
||||
businesstoday.in##div#magazinePayWallStrip
|
||||
||nitrocdn.com/*/paywall.$script,domain=capitalaberto.com.br
|
||||
cardiologie-pratique.com##+js(ra, class, div.wrap-node, stay)
|
||||
cmcmarkets.com##+js(rc, activePaywall, .activePaywall)
|
||||
||cnv-medien.de$inline-script
|
||||
connexionfrance.com##+js(cookie-remover, /^/)
|
||||
connexionfrance.com##div#subscribe-banner
|
||||
||diariodonordeste.verdesmares.com.br/js/com.atex.gong.paywall.membership.js$script,~third-party
|
||||
divisare.com##div.blocker
|
||||
divisare.com##+js(ra, style, body[style], stay)
|
||||
dominionpost.com##+js(rc, entry-content, article > div.entry-content)
|
||||
elfinancierocr.com##+js(ra, style, div.article-body-wrapper__styled[style])
|
||||
elfinancierocr.com##div.post
|
||||
epaper.indiatimes.com##div.epaperBlockerWrap
|
||||
/\/every\.to\/[-\w]+\//$inline-script
|
||||
every.to##+js(ra, style, div#post-body-full, stay)
|
||||
||eviemagazine.com/api/trpc/post.paywall$xmlhttprequest,~third-party
|
||||
expressandstar.com,shropshirestar.com##+js(set, window.Fusion.globalContent.paywallStatus, false)
|
||||
||fokus.se/app/plugins/sesamy-fpg/assets/js/sesamy-fpg.js$script,~third-party
|
||||
forbes.sk##+js(ra, style, div.post-content-soft-paywall, stay)
|
||||
forbes.sk##div#custom-html-locker
|
||||
gocomics.com##div[data-paywall]
|
||||
gocomics.com##html:style(overflow: auto !important;)
|
||||
||golf.com/wp-content/themes/golf/compiled/js/wsumApp.js$script,~third-party
|
||||
gothamist.com##+js(rc, leadin, div.leadin, stay)
|
||||
gothamist.com##div.wall-wrapper
|
||||
hartfordbusiness.com##+js(ra, style, div.expandable-paywall-premium-content[style], stay)
|
||||
hartfordbusiness.com##div.paywall-container
|
||||
hcn.org##+js(ra, content, meta[name="UID"])
|
||||
heatmap.news##+js(ra, style, div.body-description, stay)
|
||||
heatmap.news##div.regwall-container
|
||||
inman.com##+js(rc, paywalled-block, .paywalled-block)
|
||||
inman.com##+js(ra, class, div.entry-content-inner)
|
||||
inman.com##div.content-wrap > div:not([class]):style(margin: 5% !important)
|
||||
inman.com##.ism-article-block
|
||||
||cloudfront.net/imonkey-blog-*.min.js$script,domain=insidermonkey.com
|
||||
ipsoa.it##+js(ra, style, div.paywall)
|
||||
||jerseyeveningpost.com$inline-script
|
||||
||jewishinsider.com/wp-content/themes/jewish-insider/js/owl.carousel.min.js$script,~third-party
|
||||
||jornaldocomercio.com/*/json/paywall.json$xmlhttprequest,~third-party
|
||||
jornaljoca.com.br##+js(acis, $, paywall)
|
||||
kommersant.ru##+js(rc, doc--regwall, article.doc--regwall, stay)
|
||||
kommersant.ru##section.regwall
|
||||
kunststoffe.de,qz-online.de##+js(ra, style, div[style^="filter: blur"], stay)
|
||||
kunststoffe.de,qz-online.de##dialog#paywall-dialog
|
||||
||lapost.com$inline-script
|
||||
lapost.com##+js(ra, style, div.article-content, stay)
|
||||
||lasvegasadvisor.com/opt/*.js$script,~third-party
|
||||
||lasvegasadvisor.com/js/access.min.js$script,~third-party
|
||||
lavialibera.it##+js(ra, class, div.text-preview)
|
||||
lavialibera.it##div.save_modal
|
||||
legalbites.in##+js(ra, class, div.hide.paywall-content)
|
||||
legalbites.in##div#subscription_paid_message,div.restricted_message > div.story
|
||||
lepetitjournal.net##.message-restricted-woocommerce
|
||||
lepetitjournal.net##+js(rc, excerpt, div.excerpt)
|
||||
lydogbillede.dk,lydogbilde.no##+js(rc, thecontent, div.thecontent)
|
||||
lydogbillede.dk,lydogbilde.no##+js(ra, style, div#MoreLink_content-container[style])
|
||||
lydogbillede.dk,lydogbilde.no##div.paywallbox,div#MoreLink_fade-out-div
|
||||
marketnews.com##+js(ra, class, div.body-description)
|
||||
||cloudfront.net/js/prometeo-media/$script,domain=menorca.info|ultimahora.es
|
||||
meritnation.com##.view-full-answer
|
||||
meritnation.com##+js(rc, maxHeight75px, div.exp_content.maxHeight75px)
|
||||
||moscout.com$inline-script
|
||||
museumsassociation.org##+js(rc, paywall, body.paywall)
|
||||
museumsassociation.org##+js(ra, style, body[style], stay)
|
||||
museumsassociation.org##div#paywall-wrapper,div.advertising
|
||||
||musicomh.com/wp-content/*/bundle.js$script,~third-party
|
||||
nacion.com##+js(ra, style, div.article-body-wrapper__styled[style], stay)
|
||||
nacion.com##div.post
|
||||
narcity.com##+js(ra, style, div.body-description[style], stay)
|
||||
narcity.com##div#login-wall,div#overlay,div.brid-container,div.brandsnippet-article,div[class$='ad-wrapper']
|
||||
||newbostonpost.com/*/paywall/js/main.js$script,~third-party
|
||||
newoxfordreview.org##+js(rc, not-viewable, div.not-viewable)
|
||||
nu.nl##+js(rc, authorized-content, div.authorized-content, stay)
|
||||
nu.nl##+js(rc, semi-authorized-content, div.semi-authorized-content, stay)
|
||||
nu.nl##article#LOGIN
|
||||
||odt.co.nz/bwtw/scripts/tw.js$script,~third-party
|
||||
odt.co.nz##+js(ra, property, div[property="content:encoded"])
|
||||
opopular.com.br##+js(rc, restricted, div.restricted, stay)
|
||||
opopular.com.br##div.PJLV-ihxtsVt-css
|
||||
||opovo.com.br/*/js/auth/auth_new_menu.min.js$script,~third-party
|
||||
||pebmed.com.br/wp-content/*/paywall/dist/js/app.js$script,~third-party
|
||||
||perspectivemedia.com/wp-admin/admin-ajax.php$xmlhttprequest,~third-party
|
||||
perspectivemedia.com##div.hustle-ui
|
||||
popbitch.com##+js(ra, class, div[class*="-premium"])
|
||||
psypost.org##+js(cookie-remover, issuem_lp)
|
||||
publishersweekly.com##+js(ra,class|style,div#contentdiv.loggedInOnly,stay)
|
||||
publishersweekly.com##div#contentdiv.loggedOutOnly
|
||||
||racketmn.com/_next/*/%5BsiteSlug*.js$script,~third-party
|
||||
||racquetmag.com/_next/*/%5BsiteSlug*.js$script,~third-party
|
||||
||rdhmag.com$inline-script
|
||||
rockdelux.com##+js(ra, class|style, body, stay)
|
||||
rockdelux.com##+js(ra, style, div#body, stay)
|
||||
rockdelux.com##div.bg-paywall
|
||||
rotowire.com##+js(ra, class, div.pw-content)
|
||||
rotowire.com##div.paywall-full,div.article-preview-fader
|
||||
||serenitymarkets.com/wp-content/themes/Divi-child/assets/js/encriptar.js$script,~third-party
|
||||
serenitymarkets.com##+js(ra, class, div.blur_content, stay)
|
||||
||shrm.org/*/js/paywall*.js$script,~third-party
|
||||
skepticalinquirer.org##+js(rc, google-bot, div.google-bot, stay)
|
||||
solarserver.de##+js(ra, style, div.paywall)
|
||||
solarserver.de##+js(ra, class, div.paywall-blurred)
|
||||
solarserver.de##div.paywall-box
|
||||
/\.solicitorsjournal\.com\/_next\/static\/chunks\/\d.+\.js/$script,domain=solicitorsjournal.com,~third-party
|
||||
||southernstar.ie/js/tollbridge.js$script,~third-party
|
||||
speakup.it##div.paywall-container
|
||||
||spectrejournal.com/wp-content/plugins/elementor/*/dialog.min.js$script,~third-party
|
||||
spiked-online.com##+js(set-local-storage-item, nudges, {})
|
||||
splainer.in##+js(rc, hide-section, .hide-section)
|
||||
splainer.in##.subscription-prompt
|
||||
||splinter.com/wp-content/themes/pastemagazine/js/pm_custom.js$script,~third-party
|
||||
standcolumbia.org##+js(ra, class, div.stu-lock-content, stay)
|
||||
standcolumbia.org##div.stu-blur-overlay
|
||||
stateaffairs.com##div.c-memberships-message
|
||||
stateaffairs.com##+js(rc, access-restricted, body.access-restricted)
|
||||
stockunlock.com##div[class*="-root"][class*="css-"]:style(filter: none !important; pointer-events: auto !important)
|
||||
stockunlock.com##div.css-coxdc8
|
||||
strangematters.coop##+js(cookie-remover, pmpro_lpv_count)
|
||||
subscriptioninsider.com##+js(rc, dialog-prevent-scroll, body.dialog-prevent-scroll, stay)
|
||||
subscriptioninsider.com##div.dialog-widget
|
||||
!#if (adguard_app_ios)
|
||||
/\.subscriptioninsider\.com\/.+\/(\w+-){3,}/$inline-script,domain=subscriptioninsider.com
|
||||
!#endif
|
||||
thecore.in##+js(ra, class, div.paywall-content)
|
||||
thecore.in##div.story,div#subscription_paid_message,div#footer_login_wall
|
||||
thecountersignal.com##+js(ra, class, body.single div.elementor-widget-container)
|
||||
||thedriftmag.com/wp-content/plugins/drift-paywall-plugin/$script,~third-party
|
||||
theindianalawyer.com##+js(rc, restricted-non-subscriber, article.restricted-non-subscriber)
|
||||
theindianalawyer.com##+js(ra, style, article-content>p)
|
||||
theindianalawyer.com##div#vue-growler,div#js-modal
|
||||
thejc.com##+js(ra, class, div.paywall, stay)
|
||||
thejc.com##div.poool-widget
|
||||
||thenationalpulse.com/wp-content/*/assets/js/national-pulse.js$script,~third-party
|
||||
||theschooloflife.com/app/plugins/*/woocommerce.min.js$script,~third-party
|
||||
aap.thestreet.com##+js(rc, is-paywalled, body.is-paywalled)
|
||||
realmoney.thestreet.com##+js(cookie-remover, /^PWT/)
|
||||
||thetablet.org$inline-script
|
||||
thetablet.org##+js(rc, gated-content, body.gated-content)
|
||||
tidningenridsport.se##+js(ra, class|style, div.mctos)
|
||||
tidningenridsport.se##+js(rc, cli-barmodal-open, body.cli-barmodal-open)
|
||||
tidningenridsport.se##div.locked
|
||||
timeslive.co.za##+js(set, window.Fusion.globalContent.content_restrictions, {})
|
||||
trailsoffroad.com##.paywall
|
||||
wbjournal.com##+js(ra, style, div.expandable-paywall-premium-content, stay)
|
||||
wbjournal.com##div.paywall-container
|
||||
wbez.org##div.email-wall-content-lock:remove()
|
||||
||zeitzeichen.net/sites/default/files/js/js_*.js$script,~third-party
|
||||
|
||||
! Arena Holdings (ZA)
|
||||
businessday.co.za,dailydispatch.co.za,sowetan.co.za,theherald.co.za,timeslive.co.za##section.b-paywall__overlay
|
||||
businessday.co.za,dailydispatch.co.za,sowetan.co.za,theherald.co.za,timeslive.co.za##+js(ra, style, html, stay)
|
||||
|
||||
! General (amp)
|
||||
||ampproject.org/*/amp-access-$script,domain=~cambridge.org|~cmjornal.pt
|
||||
||ampproject.org/*/amp-subscriptions-$script
|
||||
@@||ampproject.org/v0/amp-consent-$script
|
||||
|
||||
artnet.com,bostonglobe.com,dallasnews.com,latimes.com,sandiegouniontribune.com##+js(ra, subscriptions-section, [subscriptions-section="content"])
|
||||
artnet.com,bostonglobe.com,dallasnews.com,latimes.com,sandiegouniontribune.com##[subscriptions-section="content-not-granted"]
|
||||
digiday.com,inc42.com,indianexpress.com,indiatoday.in,mid-day.com,telegraph.co.uk##+js(ra, amp-access-hide, [amp-access][amp-access-hide])
|
||||
|
||||
! French/Belgian sites
|
||||
amp.elle.fr,challenges.fr,sciencesetavenir.fr##+js(ra, amp-access-hide, [amp-access][amp-access-hide])
|
||||
! Groupe IPM
|
||||
dhnet.be,lalibre.be,lavenir.net,moustique.be##+js(rc, is-preview, div.preview)
|
||||
dhnet.be,lalibre.be,lavenir.net,moustique.be##+js(rc, is-hidden, div.is-hidden)
|
||||
|
||||
! Australia News Corp
|
||||
adelaidenow.com.au,cairnspost.com.au,codesports.com.au,couriermail.com.au,dailytelegraph.com.au,geelongadvertiser.com.au,goldcoastbulletin.com.au,heraldsun.com.au,ntnews.com.au,theaustralian.com.au,thechronicle.com.au,themercury.com.au,townsvillebulletin.com.au,weeklytimesnow.com.au##+js(ra, subscriptions-section, [subscriptions-section="content"])
|
||||
adelaidenow.com.au,cairnspost.com.au,codesports.com.au,couriermail.com.au,dailytelegraph.com.au,geelongadvertiser.com.au,goldcoastbulletin.com.au,heraldsun.com.au,ntnews.com.au,theaustralian.com.au,thechronicle.com.au,themercury.com.au,townsvillebulletin.com.au,weeklytimesnow.com.au##[subscriptions-section="content-not-granted"]
|
||||
|
||||
! Italian sites
|
||||
corriere.it,ilfattoquotidiano.it,ilfoglio.it##+js(ra, subscriptions-section, [subscriptions-section="content"])
|
||||
corriere.it,ilfattoquotidiano.it,ilfoglio.it##[subscriptions-section="content-not-granted"]
|
||||
! Quotidiano.net (+ regional)
|
||||
ilgiorno.it,ilrestodelcarlino.it,iltelegrafolivorno.it,lanazione.it,quotidiano.net##+js(ra, amp-access-hide, [amp-access][amp-access-hide])
|
||||
|
||||
! McClatchy Group
|
||||
amp.bnd.com,amp.charlotteobserver.com,amp.elnuevoherald.com,amp.fresnobee.com,amp.kansas.com,amp.kansascity.com,amp.kentucky.com,amp.mcclatchydc.com,amp.miamiherald.com,amp.newsobserver.com,amp.sacbee.com,amp.star-telegram.com,amp.thestate.com,amp.tri-cityherald.com##+js(ra, subscriptions-section, [subscriptions-section="content"])
|
||||
amp.bnd.com,amp.charlotteobserver.com,amp.elnuevoherald.com,amp.fresnobee.com,amp.kansas.com,amp.kansascity.com,amp.kentucky.com,amp.mcclatchydc.com,amp.miamiherald.com,amp.newsobserver.com,amp.sacbee.com,amp.star-telegram.com,amp.thestate.com,amp.tri-cityherald.com##[subscriptions-section="content-not-granted"]
|
||||
amp.sacbee.com##+js(ra, subscriptions-action, div[subscriptions-action][subscriptions-display="NOT data.hasError"])
|
||||
|
||||
! Nine Entertainment (Australia)
|
||||
amp.brisbanetimes.com.au,amp.smh.com.au,amp.theage.com.au,amp.watoday.com.au##+js(ra, subscriptions-section, [subscriptions-section="content"])
|
||||
amp.brisbanetimes.com.au,amp.smh.com.au,amp.theage.com.au,amp.watoday.com.au##[subscriptions-section="content-not-granted"]
|
||||
|
||||
! Spanish/Portugese/Brazilian/Colombian sites
|
||||
amp.elmundo.es,amp.expansion.com,amp.marca.com,elespanol.com,em.com.br,folha.uol.com.br,gazetadopovo.com.br##+js(ra, subscriptions-section, [subscriptions-section="content"])
|
||||
amp.elmundo.es,amp.expansion.com,amp.marca.com,elespanol.com,em.com.br,folha.uol.com.br,gazetadopovo.com.br##[subscriptions-section="content-not-granted"]
|
||||
eldiario.es,elespectador.com,elpais.com,estadao.com.br,infolibre.es,sabado.pt##+js(ra, amp-access-hide, [amp-access][amp-access-hide])
|
||||
! Grupo Vocento
|
||||
abc.es,canarias7.es,diariosur.es,diariovasco.com,elcomercio.es,elcorreo.com,eldiariomontanes.es,elnortedecastilla.es,hoy.es,ideal.es,larioja.com,lasprovincias.es,laverdad.es,lavozdigital.es##+js(ra, amp-access-hide, [amp-access][amp-access-hide])
|
||||
abc.es##+js(ra, id, body#top)
|
||||
1257
userscript/bpc.de.user.js
Normal file
1257
userscript/bpc.de.user.js
Normal file
File diff suppressed because it is too large
Load diff
5169
userscript/bpc.en.user.js
Normal file
5169
userscript/bpc.en.user.js
Normal file
File diff suppressed because it is too large
Load diff
883
userscript/bpc.es.pt.user.js
Normal file
883
userscript/bpc.es.pt.user.js
Normal file
|
|
@ -0,0 +1,883 @@
|
|||
// ==UserScript==
|
||||
// @name Bypass Paywalls Clean - es/pt/south america
|
||||
// @version 4.2.4.0
|
||||
// @description Bypass Paywalls of news sites
|
||||
// @author magnolia1234
|
||||
// @downloadURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.es.pt.user.js
|
||||
// @updateURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.es.pt.user.js
|
||||
// @homepageURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @supportURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @license MIT; https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=LICENSE
|
||||
// @noframes
|
||||
// @match *://*.es/*
|
||||
// @match *://*.abcmais.com/*
|
||||
// @match *://*.abril.com.br/*
|
||||
// @match *://*.ara.cat/*
|
||||
// @match *://*.arabalears.cat/*
|
||||
// @match *://*.cartacapital.com.br/*
|
||||
// @match *://*.clarin.com/*
|
||||
// @match *://*.correiodopovo.com.br/*
|
||||
// @match *://*.cronista.com/*
|
||||
// @match *://*.crusoe.com.br/*
|
||||
// @match *://*.diaridegirona.cat/*
|
||||
// @match *://*.diariocordoba.com/*
|
||||
// @match *://*.diariocorreo.pe/*
|
||||
// @match *://*.diariovasco.com/*
|
||||
// @match *://*.diplomatique.org.br/*
|
||||
// @match *://*.dn.pt/*
|
||||
// @match *://*.elcomercio.pe/*
|
||||
// @match *://*.elconfidencial.com/*
|
||||
// @match *://*.elcorreo.com/*
|
||||
// @match *://*.elespanol.com/*
|
||||
// @match *://*.elespectador.com/*
|
||||
// @match *://*.elmercurio.com/*
|
||||
// @match *://*.elobservador.com.uy/*
|
||||
// @match *://*.elpais.com/*
|
||||
// @match *://*.elperiodico.com/*
|
||||
// @match *://*.elperiodicodearagon.com/*
|
||||
// @match *://*.elperiodicoextremadura.com/*
|
||||
// @match *://*.elperiodicomediterraneo.com/*
|
||||
// @match *://*.eltiempo.com/*
|
||||
// @match *://*.eltribuno.com/*
|
||||
// @match *://*.eluniverso.com/*
|
||||
// @match *://*.em.com.br/*
|
||||
// @match *://*.emporda.info/*
|
||||
// @match *://*.estadao.com.br/*
|
||||
// @match *://*.exame.com/*
|
||||
// @match *://*.expansion.com/*
|
||||
// @match *://*.expresso.pt/*
|
||||
// @match *://*.gauchazh.clicrbs.com.br/*
|
||||
// @match *://*.gazetadopovo.com.br/*
|
||||
// @match *://*.gestion.pe/*
|
||||
// @match *://*.globo.com/*
|
||||
// @match *://*.lanacion.com.ar/*
|
||||
// @match *://*.larioja.com/*
|
||||
// @match *://*.lasegunda.com/*
|
||||
// @match *://*.latercera.com/*
|
||||
// @match *://*.lavoz.com.ar/*
|
||||
// @match *://*.levante-emv.com/*
|
||||
// @match *://*.losandes.com.ar/*
|
||||
// @match *://*.marca.com/*
|
||||
// @match *://*.nsctotal.com.br/*
|
||||
// @match *://*.observador.pt/*
|
||||
// @match *://*.ole.com.ar/*
|
||||
// @match *://*.politicaexterior.com/*
|
||||
// @match *://*.regio7.cat/*
|
||||
// @match *://*.revistaoeste.com/*
|
||||
// @match *://*.sabado.pt/*
|
||||
// @match *://*.uol.com.br/*
|
||||
// @connect archive.fo
|
||||
// @connect archive.is
|
||||
// @connect archive.li
|
||||
// @connect archive.md
|
||||
// @connect archive.ph
|
||||
// @connect archive.vn
|
||||
// @grant GM.xmlHttpRequest
|
||||
// @require https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc_func.js
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
//'use strict';
|
||||
|
||||
window.setTimeout(function () {
|
||||
|
||||
var ar_grupo_clarin_domains =['clarin.com', 'lavoz.com.ar', 'losandes.com.ar', 'ole.com.ar'];
|
||||
var es_epiberica_domains = ['diariodemallorca.es', 'eldia.es', 'elperiodico.com', 'epe.es', 'farodevigo.es', 'informacion.es', 'laprovincia.es', 'levante-emv.com', 'lne.es', 'mallorcazeitung.es', 'superdeporte.es'];
|
||||
var es_epiberica_custom_domains = ['diaridegirona.cat', 'diariocordoba.com', 'diariodeibiza.es', 'elcorreogallego.es', 'elcorreoweb.es', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info', 'laopinioncoruna.es', 'laopiniondemalaga.es', 'laopiniondemurcia.es', 'laopiniondezamora.es', 'regio7.cat'];
|
||||
var es_grupo_vocento_domains = ['abc.es', 'canarias7.es', 'diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'lasprovincias.es', 'laverdad.es', 'lavozdigital.es'];
|
||||
var es_unidad_domains = ['elmundo.es', 'expansion.com', 'marca.com'];
|
||||
var pe_grupo_elcomercio_domains = ['diariocorreo.pe', 'elcomercio.pe', 'gestion.pe'];
|
||||
|
||||
if (window.location.hostname.match(/\.(es|pt|cat)$/) || matchDomain(['diariocordoba.com', 'diariovasco.com', 'elconfidencial.com', 'elcorreo.com', 'elespanol.com', 'elpais.com', 'elperiodico.com', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info', 'expansion.com', 'larioja.com', 'levante-emv.com', 'marca.com', 'politicaexterior.com'])) {//spain/portugal
|
||||
|
||||
if (matchDomain(['ara.cat', 'arabalears.cat'])) {
|
||||
if (!window.location.pathname.endsWith('.amp.html')) {
|
||||
amp_redirect('div.paywall');
|
||||
let ads = 'div.advertising';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('diariodenavarra.es')) {
|
||||
let paywall = document.querySelector('div#paywall_message');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let json_script = getArticleJsonScript();
|
||||
if (json_script) {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json) {
|
||||
let json_text = json.articleBody;
|
||||
let article = document.querySelector('div.free-html');
|
||||
if (json_text && article)
|
||||
article.innerText = parseHtmlEntities(json_text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('dn.pt')) {
|
||||
let paywall = document.querySelector('div#metered-paywall-banner');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div.paywall');
|
||||
if (article) {
|
||||
let article_new = getArticleQuintype();
|
||||
if (article_new && article.parentNode)
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('elconfidencial.com')) {
|
||||
let premium = document.querySelector('div.newsType__content--closed');
|
||||
if (premium)
|
||||
premium.classList.remove('newsType__content--closed');
|
||||
let ads = 'div[id^="mega_"], div[id^="roba_"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('eldiario.es')) {
|
||||
if (window.location.pathname.endsWith('.amp.html')) {
|
||||
amp_unhide_access_hide('^="access"', '="NOT access"');
|
||||
} else {
|
||||
amp_redirect('aside.paywall');
|
||||
let ads = 'div.edi-advertising, div.header-ad, aside.news-sponsored-content, div.report__wrapper';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('elespanol.com')) {
|
||||
if (window.location.pathname.endsWith('.amp.html')) {
|
||||
amp_unhide_subscr_section();
|
||||
} else {
|
||||
let paywall = document.querySelector('div.full-suscriptor-container');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let content_hidden = document.querySelector('div.content-not-granted-paywall');
|
||||
if (content_hidden)
|
||||
content_hidden.classList.remove('content-not-granted-paywall');
|
||||
}
|
||||
let ads = '[id*="superior"], [class*="adv"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(es_unidad_domains)) {
|
||||
if (!window.location.hostname.startsWith('amp.')) {
|
||||
let url = window.location.href;
|
||||
if (!window.location.pathname.startsWith('/mejores-colegios')) {
|
||||
amp_redirect('div[class^="ue-c-article__premium"]', '', url.replace('/www.', '/amp.'));
|
||||
} else if (matchDomain('elmundo.es')) {
|
||||
header_nofix('main p', 'div.ue-c-article__premium');
|
||||
header_nofix('table', 'div.ue-c-paywall');
|
||||
}
|
||||
} else {
|
||||
amp_unhide_access_hide('="authorized=true"', '="authorized!=true"');
|
||||
amp_unhide_subscr_section('.advertising, .ue-c-ad');
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('elpais.com')) {
|
||||
if (window.location.pathname.endsWith('.amp.html') || window.location.search.match(/(\?|&)outputType=amp/)) {
|
||||
amp_unhide_access_hide('="vip"], [amp-access="success"', '="NOT vip"], [amp-access="NOT success"', 'div._cf');
|
||||
}
|
||||
let ads = 'div.ad-giga, aside.outbrain';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain(es_grupo_vocento_domains)) {
|
||||
let paywall_sel = 'div.voc-paywall, div.container-wall-exclusive__content-login';
|
||||
let paywall = document.querySelector(paywall_sel);
|
||||
if (!window.location.pathname.endsWith('_amp.html')) {
|
||||
if (paywall) {
|
||||
let span_break = document.querySelector('span.c-text');
|
||||
removeDOMElement(paywall, span_break);
|
||||
let art_hidden = document.querySelectorAll('.paywall, div.wpb_column > span');
|
||||
for (let elem of art_hidden) {
|
||||
let attributes = [...elem.attributes];
|
||||
for (let attrib of attributes)
|
||||
elem.removeAttribute(attrib.name);
|
||||
if (elem.tagName === 'DIV')
|
||||
elem.className = 'paywall';
|
||||
}
|
||||
}
|
||||
let ads = '.voc-advertising, div.voc-ob-wrapper, div.voc-discounts, div.ev-em-modal, span.mega-superior, div.v-adv';
|
||||
hideDOMStyle(ads, 2);
|
||||
} else {
|
||||
amp_unhide_access_hide('="result=\'ALLOW_ACCESS\'"', '="result!=\'ALLOW_ACCESS\'"', 'div.v-adv');
|
||||
let body_top = document.querySelector('body#top');
|
||||
if (body_top)
|
||||
body_top.removeAttribute('id');
|
||||
}
|
||||
let banner = 'div.container-wall-exclusive';
|
||||
hideDOMStyle(banner);
|
||||
}
|
||||
|
||||
else if (matchDomain(es_epiberica_domains) || matchDomain(es_epiberica_custom_domains)) {
|
||||
let paywall = document.querySelector('p.ft-helper-closenews');
|
||||
if (paywall) {
|
||||
paywall.classList.remove('ft-helper-closenews');
|
||||
}
|
||||
if (window.location.pathname.endsWith('.amp.html') || ['amp.elperiodico.com', 'amp.epe.es'].includes(window.location.hostname)) {
|
||||
let amp_images = document.querySelectorAll('figure > amp-img[src]');
|
||||
for (let amp_image of amp_images) {
|
||||
let elem = document.createElement('img');
|
||||
elem.src = amp_image.getAttribute('src');
|
||||
elem.style = 'width: 75%; margin: 0px 50px;';
|
||||
amp_image.parentNode.replaceChild(elem, amp_image);
|
||||
}
|
||||
document.querySelectorAll('div#the-most').forEach(e => e.removeAttribute('style'));
|
||||
let ads = 'amp-next-page, span.ad-signature, div.wrap, .ft-ad';
|
||||
hideDOMStyle(ads);
|
||||
} else {
|
||||
let ads = 'div.commercial-up-full__wrapper, .ft-ad, div[class^="_mo_recs"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('expresso.pt')) {
|
||||
if (!window.location.hostname.startsWith('amp.')) {
|
||||
let article_sel = 'div.article-content';
|
||||
let paywall = document.querySelector(article_sel + ' > div.g-premium-blocker');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector(article_sel);
|
||||
if (article) {
|
||||
let url = window.location.href.split(/[#\?]/)[0];
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.text().then(html => {
|
||||
if (html.match(/window\.__INITIAL_DATA__\s?=\s?/)) {
|
||||
try {
|
||||
article.innerHTML = '';
|
||||
let json = JSON.parse(html.split(/window\.__INITIAL_DATA__\s?=\s?/)[1].split(';window.')[0].replace(/":undefined([,}])/g, "\":\"undefined\"$1")).nodes;
|
||||
let pars = [];
|
||||
for (let elem in json) {
|
||||
let item = json[elem];
|
||||
if (item.type === 'Layout') {
|
||||
for (let elem of item.nodes) {
|
||||
if (elem.type === 'MainBody')
|
||||
pars = elem.nodes[0].data.content.contents;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
let parser = new DOMParser();
|
||||
for (let par of pars) {
|
||||
let par_new;
|
||||
if (par.html) {
|
||||
let doc = parser.parseFromString('<div>' + par.html + '</div>', 'text/html');
|
||||
par_new = doc.querySelector('div');
|
||||
} else if (par.type === 'PICTURE') {
|
||||
if (par.urlOriginal) {
|
||||
par_new = makeFigure(par.urlOriginal, par.caption, {style: 'width:100%'});
|
||||
}
|
||||
} else if (par.link && par.title) {
|
||||
if (par.contents) {
|
||||
par_new = document.createElement('div');
|
||||
for (let elem of par.contents) {
|
||||
let elem_new;
|
||||
if (elem.html) {
|
||||
let doc = parser.parseFromString('<div>' + elem.html + '</div>', 'text/html');
|
||||
elem_new = doc.querySelector('div');
|
||||
} else if (elem.urlOriginal) {
|
||||
elem_new = makeFigure(elem.urlOriginal, elem.caption, {style: 'width:100%'});
|
||||
}
|
||||
if (elem_new)
|
||||
par_new.appendChild(elem_new);
|
||||
}
|
||||
} else {
|
||||
par_new = document.createElement('p');
|
||||
let art_link = document.createElement('a');
|
||||
art_link.innerText = par.title;
|
||||
art_link.href = par.link;
|
||||
par_new.appendChild(art_link);
|
||||
}
|
||||
}
|
||||
if (par_new)
|
||||
article.appendChild(par_new);
|
||||
else
|
||||
console.log(par);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(function (err) {
|
||||
false;
|
||||
});
|
||||
}
|
||||
}
|
||||
} else
|
||||
ampToHtml();
|
||||
}
|
||||
|
||||
else if (matchDomain('infolibre.es')) {
|
||||
if (window.location.pathname.endsWith('.amp.html')) {
|
||||
amp_unhide_access_hide('^="access"', '="NOT access"');
|
||||
} else {
|
||||
amp_redirect('div.paywall__wrapper');
|
||||
let ads = 'div.edi-advertising, div.header-ad';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(['lavanguardia.com', 'mundodeportivo.com'])) {
|
||||
let ads = 'span.content-ad, span.hidden-ad, span.ad-unit, div.ad-div';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('observador.pt')) {
|
||||
let ads = 'div.obs-ad-placeholder, obs-toaster-seats, obs-moa-btn-seats';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('politicaexterior.com')) {
|
||||
let paywall = document.querySelector('div[class^="paywall-"]');
|
||||
if (paywall) {
|
||||
let article = document.querySelector('div.entry-content-text');
|
||||
let json = document.querySelector('script[type="application/ld+json"]:not([class])');
|
||||
if (json) {
|
||||
let json_text = JSON.parse(json.text).description.replace(/&nbsp;/g, '');
|
||||
let article_new = document.createElement('div');
|
||||
article_new.setAttribute('class', 'entry-content-text');
|
||||
article_new.innerText = '\r\n' + json_text;
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
}
|
||||
removeDOMElement(paywall);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('publico.es')) {
|
||||
let ads = 'div.pb-ads';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('sabado.pt')) {
|
||||
if (!window.location.pathname.includes('/amp/'))
|
||||
amp_redirect('.bloqueio_exclusivos, .container_assinatura, .bloco_bloqueio', '', window.location.href.replace('/detalhe/', '/amp/'));
|
||||
else
|
||||
amp_unhide_access_hide('="subscriber"', '="NOT subscriber"', 'div.adbox, amp-consent, .detalheAds, .exclusivos_bar');
|
||||
}
|
||||
|
||||
else if (window.location.hostname.endsWith('.es')) {// Sport Life Ibérica sites
|
||||
if (document.querySelector('div > ul > li > a[href="https://www.sportlife.es/"]')) {
|
||||
let paywall = document.querySelector('div.c-paywall');
|
||||
if (paywall) {
|
||||
let article = document.querySelector('div.c-mainarticle__body');
|
||||
let json_script = getArticleJsonScript();
|
||||
if (json_script) {
|
||||
let json_text = JSON.parse(json_script.text).articleBody;
|
||||
let article_new = document.createElement('div');
|
||||
article_new.innerText = json_text;
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
}
|
||||
removeDOMElement(paywall);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (window.location.hostname.match(/\.(ar|br|cl|pe|uy)$/) || matchDomain(['abcmais.com', 'clarin.com', 'cronista.com', 'elespectador.com', 'elmercurio.com', 'eltiempo.com', 'eltribuno.com', 'eluniverso.com', 'exame.com', 'globo.com', 'lasegunda.com', 'latercera.com', 'revistaoeste.com'])) {//south america
|
||||
|
||||
if (matchDomain('abcmais.com')) {
|
||||
if (!window.location.pathname.endsWith('/amp/')) {
|
||||
getJsonUrl('section#section-iframe-assinante', '', 'div.degressing-opacity');
|
||||
} else {
|
||||
let paywall = document.querySelector('div.b-vindo');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let template = document.querySelector('template');
|
||||
if (template) {
|
||||
let article = document.querySelector('section > div.resumo');
|
||||
if (article) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + template.innerHTML + '</div>', 'text/html');
|
||||
let article_new = doc.querySelector('div');
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('abril.com.br')) {
|
||||
if (window.location.pathname.endsWith('/amp/')) {
|
||||
let paywall = document.querySelector('.piano-modal');
|
||||
removeDOMElement(paywall);
|
||||
} else {
|
||||
let ads = 'div.ads, div[class^="ads-"], div.MGID';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(ar_grupo_clarin_domains)) {
|
||||
let ads = 'div.ad-slot, div.box-adv, div.wrapperblock, div.banner, div[id^="div-gpt-ad-"], div.bannerTopHeader, div.sticky, div.SRA';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('cartacapital.com.br')) {
|
||||
if (!window.location.pathname.endsWith('/amp/')) {
|
||||
let paywall = document.querySelector('aside.paywall');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let json_script = getArticleJsonScript();
|
||||
if (json_script) {
|
||||
try {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json) {
|
||||
let json_text = json[1].articleBody.replace(/\s{2,}/g, '\r\n\r\n');
|
||||
let content = document.querySelector('section.s-content__text');
|
||||
if (json_text && content) {
|
||||
content.innerHTML = '';
|
||||
let article_new = document.createElement('p');
|
||||
article_new.innerText = json_text;
|
||||
content.appendChild(article_new);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let content_soft = document.querySelector('div.contentSoft');
|
||||
if (content_soft) {
|
||||
content_soft.removeAttribute('class');
|
||||
let freemium = document.querySelectorAll('div[class^="s-freemium"], div.maggazine-add');
|
||||
removeDOMElement(...freemium);
|
||||
}
|
||||
}
|
||||
let ads = 'div.div_ros_topo';
|
||||
hideDOMStyle(ads);
|
||||
} else
|
||||
ampToHtml();
|
||||
}
|
||||
|
||||
else if (matchDomain('cronista.com')) {
|
||||
let paywall = document.querySelector('div.article-body--blurred');
|
||||
if (paywall)
|
||||
paywall.classList.remove('article-body--blurred');
|
||||
let ads = 'div#ad-slot-header, div.ad-slot-intext, div#selectMediaNota, div.b-suscription-container, div.paywall-chain--show';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('crusoe.com.br')) {
|
||||
getJsonUrl('section.paywall', '', 'div#content_post', {art_append: 1});
|
||||
let ads = 'div#gpt-leaderboard, div.ads_desktop, div[class^="container-banner-"], div.catchment-box';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('diplomatique.org.br')) {
|
||||
getJsonUrl('div.entry-content div.module_row', '', 'div.entry-content');
|
||||
}
|
||||
|
||||
else if (matchDomain(pe_grupo_elcomercio_domains)) {
|
||||
let paywall = document.querySelector('.paywall');
|
||||
if (paywall) {
|
||||
paywall.removeAttribute('class');
|
||||
paywall.removeAttribute('style');
|
||||
let fade = document.querySelector('p.story-contents--fade');
|
||||
if (fade)
|
||||
fade.classList.remove('story-contents--fade');
|
||||
}
|
||||
let ads = 'div[class^="content_gpt"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('elespectador.com')) {
|
||||
if (window.location.search.includes('outputType=amp')) {
|
||||
amp_unhide_access_hide('="granted"', '="NOT granted"', '[class^="Widget"], amp-fx-flying-carpet, div[style*=";background:"]:has(amp-ad)', false);
|
||||
let googledoc_iframes = document.querySelectorAll('div > amp-iframe[src^="https://docs.google.com/viewer"][class]');
|
||||
for (let elem of googledoc_iframes) {
|
||||
let a_link = document.createElement('a');
|
||||
a_link.href = elem.getAttribute('src');
|
||||
a_link.innerText = 'pdf-link';
|
||||
a_link.target = '_blank';
|
||||
elem.removeAttribute('class');
|
||||
elem.parentNode.before(a_link);
|
||||
}
|
||||
} else {
|
||||
amp_redirect('div.exclusive_validation');
|
||||
let ads = 'div.Ads, div[class^="Ads_"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('elmercurio.com')) {
|
||||
if (window.location.hostname.startsWith('digital.')) {
|
||||
window.setTimeout(function () {
|
||||
let elem_hidden = document.querySelectorAll('[style="visibility:hidden"]');
|
||||
for (let elem of elem_hidden)
|
||||
elem.removeAttribute('style');
|
||||
let page_pdf_content = document.querySelector('div.page_pdf_content');
|
||||
let close_html = document.querySelector('div.close_html');
|
||||
let cont_page_full = document.querySelector('div.cont_page_full');
|
||||
removeDOMElement(page_pdf_content, close_html, cont_page_full);
|
||||
}, 1000);
|
||||
window.setTimeout(function () {
|
||||
let cont_articlelight = document.querySelector('div.cont_articlelight');
|
||||
if (cont_articlelight)
|
||||
cont_articlelight.setAttribute('style', 'height: 100% !important; width: 90% !important');
|
||||
}, 3000);
|
||||
if (window.location.pathname.startsWith('/mobile')) {
|
||||
let lessreadmore = document.querySelectorAll('article.lessreadmore');
|
||||
for (let article of lessreadmore)
|
||||
article.classList.remove('lessreadmore');
|
||||
let bt_readmore = document.querySelectorAll('div[id*="bt_readmore_"]');
|
||||
removeDOMElement(...bt_readmore);
|
||||
}
|
||||
} else if (window.location.pathname.endsWith('/Registro/Login.aspx')) {
|
||||
header_nofix('body');
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('elobservador.com.uy')) {
|
||||
if (window.location.pathname.endsWith('/amp')) {
|
||||
amp_unhide_access_hide('="observador.mostrarNota"');
|
||||
let amp_images = document.querySelectorAll('div.fixed-container > amp-img.null');
|
||||
for (let amp_image of amp_images) {
|
||||
let elem = document.createElement('img');
|
||||
Object.assign(elem, {
|
||||
src: amp_image.getAttribute('src'),
|
||||
alt: amp_image.getAttribute('alt'),
|
||||
title: amp_image.getAttribute('title')
|
||||
});
|
||||
amp_image.parentNode.replaceChild(elem, amp_image);
|
||||
}
|
||||
} else {
|
||||
amp_redirect('div.mensaje_member', '', window.location.pathname + '/amp');
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('eltiempo.com')) {
|
||||
let modulos = document.querySelector('div.modulos');
|
||||
if (modulos)
|
||||
modulos.classList.remove('modulos');
|
||||
let ads = '[class^="c-add"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('eltribuno.com')) {
|
||||
let lazy_images = document.querySelectorAll('img.lazyload[data-src]:not([src])');
|
||||
for (let elem of lazy_images) {
|
||||
elem.src = elem.getAttribute('data-src');
|
||||
elem.classList.remove('lazyload');
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('eluniverso.com')) {
|
||||
let paywall = document.querySelectorAll('head > meta[name][content="premium"]');
|
||||
let article = document.querySelector('section.article-body');
|
||||
if (paywall.length && article) {
|
||||
removeDOMElement(...paywall);
|
||||
let fusion_script = document.querySelector('script#fusion-metadata');
|
||||
if (fusion_script && fusion_script.text.includes('Fusion.globalContent=')) {
|
||||
try {
|
||||
let json = JSON.parse(fusion_script.text.split('Fusion.globalContent=')[1].split(';Fusion.')[0]);
|
||||
if (json) {
|
||||
article.innerHTML = '';
|
||||
let parser = new DOMParser();
|
||||
let pars = json.content_elements;
|
||||
for (let par of pars) {
|
||||
let par_new;
|
||||
if (['header', 'text'].includes(par.type)) {
|
||||
if (par.content) {
|
||||
let doc = parser.parseFromString('<p class="prose-text">' + par.content + '</p>', 'text/html');
|
||||
par_new = doc.querySelector('p');
|
||||
}
|
||||
} else if (par.type === 'interstitial_link') {
|
||||
if (par.url && par.content) {
|
||||
par_new = document.createElement('p');
|
||||
int_link = document.createElement('a');
|
||||
int_link.href = par.url;
|
||||
int_link.innerText = par.content;
|
||||
par_new.appendChild(int_link);
|
||||
}
|
||||
} else if (par.type === 'image') {
|
||||
if (par.url) {
|
||||
let caption_text = par.caption;
|
||||
if (par.credits && par.credits.by && par.credits.by[0] && par.credits.by[0].name)
|
||||
caption_text += ' - ' + par.credits.by[0].name;
|
||||
par_new = makeFigure(par.url, caption_text);
|
||||
}
|
||||
} else if (par.type === 'raw_html') {
|
||||
let doc = parser.parseFromString('<div>' + par.content + '</div>', 'text/html');
|
||||
par_new = doc.querySelector('div');
|
||||
} else if (par.raw_oembed) {
|
||||
if (par.raw_oembed.html) {
|
||||
let doc = parser.parseFromString('<div>' + par.raw_oembed.html + '</div>', 'text/html');
|
||||
par_new = doc.querySelector('div');
|
||||
}
|
||||
} else if (par.type === 'list') {
|
||||
if (par.items) {
|
||||
par_new = document.createElement('ul');
|
||||
for (let item of par.items) {
|
||||
let li = document.createElement('li');
|
||||
let doc = parser.parseFromString('<span>' + item.content + '</span>', 'text/html');
|
||||
let span = doc.querySelector('span');
|
||||
li.appendChild(span);
|
||||
par_new.appendChild(li);
|
||||
}
|
||||
}
|
||||
} else if (par.type === 'table') {
|
||||
if (par.header && par.rows) {
|
||||
par_new = document.createElement('table');
|
||||
let h_row = document.createElement('tr');
|
||||
for (let item of par.header) {
|
||||
let th = document.createElement('th');
|
||||
let doc = parser.parseFromString('<span>' + item.content + '</span>', 'text/html');
|
||||
let span = doc.querySelector('span');
|
||||
th.appendChild(span);
|
||||
h_row.appendChild(th);
|
||||
}
|
||||
par_new.appendChild(h_row);
|
||||
for (let row of par.rows) {
|
||||
let tr = document.createElement('tr');
|
||||
for (let item of row) {
|
||||
let td = document.createElement('td');
|
||||
let doc = parser.parseFromString('<span>' + item.content + '</span>', 'text/html');
|
||||
let span = doc.querySelector('span');
|
||||
td.appendChild(span);
|
||||
tr.appendChild(td);
|
||||
}
|
||||
par_new.appendChild(tr);
|
||||
}
|
||||
}
|
||||
} else if (!['quote'].includes(par.type)) {
|
||||
console.log(par);
|
||||
}
|
||||
if (par_new)
|
||||
article.appendChild(par_new);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
let banner = pageContains('div > span', /Contenido exclusivo para suscriptores/);
|
||||
if (banner.length)
|
||||
removeDOMElement(banner[0].parentNode);
|
||||
}
|
||||
let ads = 'div[id^="ad-"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('em.com.br')) {
|
||||
if (!window.location.pathname.endsWith('/amp.html')) {
|
||||
amp_redirect('.news-blocked-content');
|
||||
let ads = 'div.ads, div.containerads, div.edm-banner, div.publicidade-interna-container';
|
||||
hideDOMStyle(ads);
|
||||
} else {
|
||||
amp_unhide_subscr_section('amp-fx-flying-carpet');
|
||||
let compress_text = document.querySelector('div.compress-text');
|
||||
if (compress_text)
|
||||
compress_text.classList.remove('compress-text');
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('estadao.com.br')) {
|
||||
if (window.location.pathname.match(/(\.amp$|^\/amp\/)/) || window.location.search.startsWith('?amp')) {
|
||||
amp_unhide_access_hide('="outputValue=\'hide_paywall\'"', '="outputValue=\'show_paywall\'"', 'amp-fx-flying-carpet, div[class^="pAd"], div.ads-container');
|
||||
} else {
|
||||
let paywall = document.getElementById('paywall-wrapper-iframe-estadao');
|
||||
removeDOMElement(paywall);
|
||||
let ads = 'div[class^="styles__Container-sc-"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('exame.com')) {
|
||||
let hidden_images = document.querySelectorAll('img[src^="data:image/"');
|
||||
for (let elem of hidden_images) {
|
||||
let noscript = elem.parentNode.querySelector('noscript');
|
||||
if (noscript && noscript.innerText.includes('src="'))
|
||||
elem.src = noscript.innerText.split('src="')[1].split('"')[0];
|
||||
}
|
||||
let ads = 'div[class*="ad-pos-"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('uol.com.br')) {
|
||||
if (matchDomain('folha.uol.com.br')) {
|
||||
if (matchDomain('piaui.folha.uol.com.br')) {
|
||||
let audio = document.querySelector('div.audio-player-container:has(audio[src])');
|
||||
if (audio) {
|
||||
let audio_new = document.createElement('audio');
|
||||
audio_new.src = audio.querySelector('audio').src;
|
||||
audio_new.setAttribute('controls', '');
|
||||
audio.parentNode.replaceChild(audio_new, audio);
|
||||
}
|
||||
header_nofix('div.paywall__content', 'div.revista--interna__assineonly', 'BPC > no fix (audio-only)');
|
||||
} else if (window.location.pathname.startsWith('/amp/')) {
|
||||
amp_unhide_subscr_section('amp-sticky-ad');
|
||||
} else {
|
||||
let signup = document.querySelector('.c-top-signup');
|
||||
removeDOMElement(signup);
|
||||
}
|
||||
}
|
||||
let ads = 'div[class*="advertising"], div.jupiter-ads, div.up-floating, div[data-cp-id$="asfads"], div.ms-hapb, div.ms-apb';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('gauchazh.clicrbs.com.br')) {
|
||||
let div_hidden = document.querySelector('div.m-paid-content > div.hidden');
|
||||
if (div_hidden)
|
||||
div_hidden.removeAttribute('class');
|
||||
let ads = 'div.ad-banner, div.animate-pulse, div.slot-superbanner, div.overflow-hidden:has(div.bg-ad-placeholder), section.ads-section-area';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('gazetadopovo.com.br')) {
|
||||
if (window.location.pathname.endsWith('/amp/')) {
|
||||
amp_unhide_subscr_section('div.ads-amp, div.tpl-wrapper', false);
|
||||
} else {
|
||||
let ads = 'div[class*="c-ads"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('globo.com')) {
|
||||
if (matchDomain('valor.globo.com')) {
|
||||
if (!window.location.pathname.startsWith('/google/amp/')) {
|
||||
amp_redirect('div.paywall');
|
||||
} else {
|
||||
amp_unhide_subscr_section();
|
||||
amp_images_replace();
|
||||
}
|
||||
} else if (window.location.pathname.includes('/amp/'))
|
||||
ampToHtml();
|
||||
if (!window.location.pathname.includes('/amp/')) {
|
||||
let ads = 'div[id^="ad-container"], div.content-ads, div[class^="block__advertising"], div#pub-in-text-wrapper, div.area_publicidade_container';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('lanacion.com.ar')) {
|
||||
setCookie(/^metering_arc/, '', 'lanacion.com.ar', '/', 0);
|
||||
if (matchDomain('suscripciones.lanacion.com.ar')) {
|
||||
let searchParams = new URLSearchParams(window.location.search);
|
||||
if (searchParams.get('callback')) {
|
||||
let article_sel = 'main.paywall-container';
|
||||
let url = atob(searchParams.get('callback')).split('?')[0];
|
||||
getArchive(url, article_sel + '> button', '', article_sel, '', 'div#fusion-app', 'div#wall');
|
||||
}
|
||||
}
|
||||
let ads = 'div.ln-banner-container';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('lasegunda.com')) {
|
||||
if (window.location.pathname.endsWith('/Registro/Login.aspx') && window.location.search.startsWith('?urlBack=')) {
|
||||
let intro = document.querySelector('body > div > article');
|
||||
if (intro) {
|
||||
intro.parentNode.removeAttribute('style');
|
||||
intro.parentNode.parentNode.style = 'margin: 20px;';
|
||||
let mh_new = document.createElement('div');
|
||||
mh_new.style = 'font-size: 20px; font-weight: bold; text-align: center; margin: 20px;';
|
||||
let main = document.createElement('a');
|
||||
main.href = 'https://www.lasegunda.com';
|
||||
main.innerText = 'la Segunda';
|
||||
mh_new.appendChild(main);
|
||||
intro.before(mh_new);
|
||||
let page = document.querySelector('div#page');
|
||||
if (page) {
|
||||
let article_id_match = window.location.search.split('?urlBack=')[1].match(/\/(\d{6,})\//);
|
||||
if (article_id_match) {
|
||||
let article_id = article_id_match[1];
|
||||
let url_src = 'https://newsapi.ecn.cl/NewsApi/lasegunda/noticia/' + article_id;
|
||||
fetch(url_src)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.json().then(json => {
|
||||
try {
|
||||
if (json._source) {
|
||||
let art_source = json._source;
|
||||
let author = document.createElement('span');
|
||||
author.innerText = art_source.autor + (art_source.fechaPublicacion ? '\r\n' + art_source.fechaPublicacion.replace('T', ' ').replace(/:00$/, '') : '');
|
||||
page.appendChild(author);
|
||||
if (art_source.tablas && art_source.tablas.tablaMedios && art_source.tablas.tablaMedios[0]) {
|
||||
let figure = makeFigure(art_source.tablas.tablaMedios[0].Url);
|
||||
figure.style = 'margin: 15px;';
|
||||
intro.firstChild.before(figure);
|
||||
}
|
||||
function make_fig(p1, p2 = '') {
|
||||
let result = '<figure style="margin: 15px 0px"><img src="' + p1 + '"><figcaption>' + (p2 ? p2.replace(/^;\s/, '') : '') + '</figcaption></figure>';
|
||||
return result;
|
||||
}
|
||||
function make_imagen(match, p1, offset, string) {
|
||||
return make_fig(p1);
|
||||
}
|
||||
function make_imagen_credito(match, p1, p2, offset, string) {
|
||||
return make_fig(p1, p2);
|
||||
}
|
||||
function make_video(match, p1, offset, string) {
|
||||
return '<video controls src="' + p1 + '" style="width: 100%; margin: 15px 0px;">';
|
||||
}
|
||||
let art_text = art_source.texto.replace(/ /g, ' ').replace(/{IMAGEN?\s([^}]+)}/g, make_imagen);
|
||||
art_text = art_text.replace(/{IMAGENCREDITO\s([^;]+)(;\s[^}]+)}/g, make_imagen_credito);
|
||||
art_text = art_text.replace(/{VIDEO?\s([^}]+)}/g, make_video);
|
||||
art_text = art_text.replace(/{CITA[^}]+}/g, '').replace(/{DESTACAR\s/g, '').replace(/}/g, '');
|
||||
if (!art_text.includes('{'))
|
||||
art_text = art_text.replace(/}/g, '');
|
||||
else
|
||||
console.log('source still has macros');
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div style="margin: 20px 0px;">' + art_text + '<br></div>', 'text/html');
|
||||
let article_new = doc.querySelector('div');
|
||||
page.appendChild(article_new);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('latercera.com')) {
|
||||
let ads = 'div.ads-block';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('nsctotal.com.br')) {
|
||||
let ads = 'div.ad, div[id^="floater"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('revistaoeste.com')) {
|
||||
if (window.location.pathname.startsWith('/revista/')) {
|
||||
let loading_content = document.querySelector('div.loading_content');
|
||||
if (loading_content)
|
||||
loading_content.removeAttribute('class');
|
||||
let spinner = document.querySelector('svg.spinner-eclipse');
|
||||
removeDOMElement(spinner);
|
||||
let lazy_images = document.querySelectorAll('img[src^="data:image/"][data-src]');
|
||||
for (let elem of lazy_images)
|
||||
elem.src = elem.getAttribute('data-src');
|
||||
} else {
|
||||
let div_expandable = document.querySelector('div.expandable');
|
||||
if (div_expandable)
|
||||
div_expandable.classList.remove('expandable');
|
||||
let ads = 'section.ad-wrapper, div.autozep-outer';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ads_hide();
|
||||
leaky_paywall_unhide();
|
||||
|
||||
}, 1000);
|
||||
|
||||
// General Functions
|
||||
|
||||
// import (see @require)
|
||||
|
||||
})();
|
||||
178
userscript/bpc.fi.se.user.js
Normal file
178
userscript/bpc.fi.se.user.js
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
// ==UserScript==
|
||||
// @name Bypass Paywalls Clean - fi/se
|
||||
// @version 4.1.8.1
|
||||
// @description Bypass Paywalls of news sites
|
||||
// @author magnolia1234
|
||||
// @downloadURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.fi.se.user.js
|
||||
// @updateURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.fi.se.user.js
|
||||
// @homepageURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @supportURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @license MIT; https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=LICENSE
|
||||
// @match *://*.berlingske.dk/*
|
||||
// @match *://*.dn.se/*
|
||||
// @match *://*.etc.se/*
|
||||
// @match *://*.suomensotilas.fi/*
|
||||
// @match *://*.weekendavisen.dk/*
|
||||
// @connect archive.fo
|
||||
// @connect archive.is
|
||||
// @connect archive.li
|
||||
// @connect archive.md
|
||||
// @connect archive.ph
|
||||
// @connect archive.vn
|
||||
// @grant GM.xmlHttpRequest
|
||||
// @require https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc_func.js
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
//'use strict';
|
||||
|
||||
window.setTimeout(function () {
|
||||
|
||||
if (matchDomain(['berlingske.dk', 'weekendavisen.dk'])) {
|
||||
let paywall = document.querySelector('div#paywall');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div[itemprop="articleBody"');
|
||||
if (article) {
|
||||
let intro = article.querySelector('p');
|
||||
let intro_class = intro ? intro.className : '';
|
||||
let json_script = document.querySelector('script#__NEXT_DATA__');
|
||||
if (json_script) {
|
||||
try {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json && json.props.pageProps.article.body) {
|
||||
function getChildValue(child) {
|
||||
let value;
|
||||
if (child.children && child.children[0]) {
|
||||
if (child.children[0].value)
|
||||
value = child.children[0].value;
|
||||
else if (child.children[0].children)
|
||||
value = child.children[0].children[0].value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
article.innerHTML = '';
|
||||
let parser = new DOMParser();
|
||||
let pars = json.props.pageProps.article.body;
|
||||
for (let par of pars) {
|
||||
let elem = document.createElement('p');
|
||||
if (['ParagraphNode', 'HeadingNode'].includes(par.type)) {
|
||||
elem.className = intro_class;
|
||||
if (par.children) {
|
||||
for (let child of par.children) {
|
||||
let sub_elem;
|
||||
if (child.type === 'TextNode') {
|
||||
sub_elem = document.createElement('span');
|
||||
sub_elem.innerText = child.value;
|
||||
if (par.type === 'HeadingNode')
|
||||
sub_elem.style = 'font-weight: bold;';
|
||||
} else if (child.type === 'HyperlinkNode') {
|
||||
let value = getChildValue(child);
|
||||
if (child.url && value) {
|
||||
sub_elem = document.createElement('a');
|
||||
sub_elem.href = child.url;
|
||||
sub_elem.innerText = value;
|
||||
} else
|
||||
console.log(child)
|
||||
} else if (child.type === 'LineBreakNode') {
|
||||
let sub_elem = document.createElement('br');
|
||||
} else
|
||||
console.log(child);
|
||||
if (sub_elem)
|
||||
elem.appendChild(sub_elem);
|
||||
}
|
||||
}
|
||||
} else if (par.type === 'FigureNode') {
|
||||
if (par.asset && par.asset.image && par.asset.image.assets) {
|
||||
let asset = par.asset.image.assets.pop();
|
||||
if (asset && asset.url) {
|
||||
let caption;
|
||||
if (par.caption && par.caption[0]) {
|
||||
caption = getChildValue(par.caption[0]);
|
||||
if (par.byline && par.byline[0])
|
||||
caption += ' ' + getChildValue(par.byline[0]);
|
||||
}
|
||||
let sub_elem = makeFigure(asset.url, caption, {style: 'width: 95%;'});
|
||||
elem.appendChild(sub_elem);
|
||||
}
|
||||
}
|
||||
} else if (par.type === 'ListNode') {
|
||||
let sub_elem = document.createElement('ul');
|
||||
if (par.children) {
|
||||
for (let child of par.children) {
|
||||
let value = getChildValue(child);
|
||||
if (value) {
|
||||
let li = document.createElement('li');
|
||||
li.innerText = value;
|
||||
sub_elem.appendChild(li);
|
||||
}
|
||||
}
|
||||
elem.appendChild(sub_elem);
|
||||
}
|
||||
} else if (par.type === 'LineBreakNode') {
|
||||
let sub_elem = document.createElement('br');
|
||||
elem.appendChild(sub_elem);
|
||||
} else if (par.type === 'CustomCodeNode') {
|
||||
elem = document.createElement('div');
|
||||
if (par.code && !par.code.includes('newsletterSignupWidget')) {
|
||||
let doc = parser.parseFromString('<div>' + par.code + '</div>', 'text/html');
|
||||
let sub_elem = doc.querySelector('div');
|
||||
elem.appendChild(sub_elem);
|
||||
}
|
||||
} else
|
||||
console.log(par);
|
||||
if (elem.hasChildNodes())
|
||||
article.appendChild(elem);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let ads = 'div[data-ad-banner]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('dn.se')) {
|
||||
let url = window.location.href;
|
||||
getArchive(url, 'div.paywall-wrapper', '', 'article');
|
||||
let ads = 'div.bad';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('etc.se')) {
|
||||
let paywall = document.querySelector('section.prose-feature > section.teaser-section');
|
||||
if (paywall) {
|
||||
paywall.classList.remove('teaser-section');
|
||||
paywall.parentNode.querySelectorAll('.hidden').forEach(e => e.classList.remove('hidden'));
|
||||
}
|
||||
let ads = 'div[class$="-ad"], article section.font-sans';
|
||||
hideDOMStyle(ads);
|
||||
let video_iframes = document.querySelectorAll('div.embed-block > iframe[width][height]');
|
||||
for (let elem of video_iframes) {
|
||||
if (elem.width > 1000) {
|
||||
let ratio = elem.width / (mobile ? 320 : 640);
|
||||
elem.width = elem.width / ratio;
|
||||
elem.height = elem.height / ratio;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('suomensotilas.fi')) {
|
||||
let obscured = document.querySelector('div.epfl-pw-obscured');
|
||||
if (obscured)
|
||||
obscured.classList.remove('epfl-pw-obscured');
|
||||
}
|
||||
|
||||
ads_hide();
|
||||
leaky_paywall_unhide();
|
||||
|
||||
}, 1000);
|
||||
|
||||
// General Functions
|
||||
|
||||
// import (see @require)
|
||||
|
||||
})();
|
||||
1925
userscript/bpc.fr.user.js
Normal file
1925
userscript/bpc.fr.user.js
Normal file
File diff suppressed because it is too large
Load diff
395
userscript/bpc.it.user.js
Normal file
395
userscript/bpc.it.user.js
Normal file
|
|
@ -0,0 +1,395 @@
|
|||
// ==UserScript==
|
||||
// @name Bypass Paywalls Clean - it
|
||||
// @version 4.2.1.0
|
||||
// @description Bypass Paywalls of news sites
|
||||
// @author magnolia1234
|
||||
// @downloadURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.it.user.js
|
||||
// @updateURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.it.user.js
|
||||
// @homepageURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @supportURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @license MIT; https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=LICENSE
|
||||
// @match *://*.it/*
|
||||
// @match *://*.eastwest.eu/*
|
||||
// @match *://*.ilsole24ore.com/*
|
||||
// @match *://*.italian.tech/*
|
||||
// @match *://*.quotidiano.net/*
|
||||
// @match *://*.tuttosport.com/*
|
||||
// @grant GM.xmlHttpRequest
|
||||
// @require https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc_func.js
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
//'use strict';
|
||||
|
||||
window.setTimeout(function () {
|
||||
|
||||
var it_gedi_domains = ['huffingtonpost.it', 'italian.tech', 'lastampa.it', 'lescienze.it', 'moda.it', 'repubblica.it'];
|
||||
var it_ilmessaggero_domains = ['corriereadriatico.it', 'ilgazzettino.it', 'ilmattino.it', 'ilmessaggero.it', 'quotidianodipuglia.it'];
|
||||
var it_quotidiano_domains = ['ilgiorno.it', 'ilrestodelcarlino.it', 'iltelegrafolivorno.it', 'lanazione.it', 'quotidiano.net'];
|
||||
|
||||
if (matchDomain('corriere.it')) {
|
||||
if (window.location.pathname.endsWith('_amp.shtml')) {
|
||||
amp_unhide_subscr_section('iframe[src^="https://ads."]');
|
||||
} else {
|
||||
if (window.location.pathname.includes('_preview.shtml') && !window.location.pathname.startsWith('/podcast/')) {
|
||||
window.setTimeout(function () {
|
||||
window.location.href = window.location.pathname.replace('_preview.shtml', '.shtml');
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
let ads = 'div.bck-adv, div.boxADVmanuale';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('corrieredellosport.it')) {
|
||||
if (!window.location.pathname.startsWith('/amp/')) {
|
||||
amp_redirect('div[class^="MainTextTruncated_paragraph__"]');
|
||||
let ads = 'div[class^="AdUnit_placeholder"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('eastwest.eu')) {
|
||||
let paywall = document.querySelector('.paywall');
|
||||
if (paywall) {
|
||||
paywall.removeAttribute('style');
|
||||
paywall.classList.remove('paywall');
|
||||
let intro = document.querySelectorAll('div#testo_articolo > p, div#testo_articolo > h3');
|
||||
let offerta = document.querySelectorAll('div.offerta_abbonamenti');
|
||||
removeDOMElement(...intro, ...offerta);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('editorialedomani.it')) {
|
||||
let paywall = document.querySelector('div.paywallbox');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div.article-preview');
|
||||
if (article) {
|
||||
article.classList.remove('article-faded');
|
||||
let json_script = getArticleJsonScript();
|
||||
if (json_script) {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json) {
|
||||
let json_text = json.articleBody;
|
||||
let par = article.querySelector('p');
|
||||
if (par)
|
||||
par.innerText = json_text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('gazzetta.it')) {
|
||||
if (window.location.pathname.endsWith('_preview.shtml')) {
|
||||
let paywall = document.querySelector('section.bck-freemium__wall');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
if (!window.location.search.startsWith('?reason=unauthenticated')) {
|
||||
window.location.href = window.location.pathname.replace('_preview', '') + '?gaa_at=g';
|
||||
} else {
|
||||
let json_script = getArticleJsonScript();
|
||||
let header = 'div.content > h2';
|
||||
if (json_script) {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json) {
|
||||
let json_text = json.articleBody.replace(/(\s{3}| )/g, '\r\n\r\n');
|
||||
let content = document.querySelector('div.content > p.has-first-letter');
|
||||
if (json_text && content) {
|
||||
let content_new = document.createElement('p');
|
||||
content_new.innerText = json_text;
|
||||
content.parentNode.replaceChild(content_new, content);
|
||||
let article_body = document.querySelector('section.body-article');
|
||||
if (article_body)
|
||||
article_body.style = 'height: auto;';
|
||||
} else
|
||||
header_nofix(header);
|
||||
}
|
||||
} else
|
||||
header_nofix(header);
|
||||
}
|
||||
}
|
||||
} else if (window.location.pathname.endsWith('_amp.shtml'))
|
||||
ampToHtml();
|
||||
}
|
||||
|
||||
else if (matchDomain('ilfattoquotidiano.it')) {
|
||||
if (window.location.pathname.endsWith('/amp/')) {
|
||||
amp_unhide_subscr_section('div#_4sVideoContainer, div#post-consent-ui');
|
||||
let logo = document.querySelector('a > amp-img[src$="/svg/logo-tablet.svg"]');
|
||||
if (logo) {
|
||||
let logo_new = document.createElement('img');
|
||||
logo_new.src = logo.getAttribute('src').replace('/svg/logo-tablet.svg', '/fq-www/logo-ifq-it.svg');
|
||||
logo_new.height = logo.getAttribute('height');
|
||||
logo_new.width = logo.getAttribute('width');
|
||||
logo.parentNode.replaceChild(logo_new, logo);
|
||||
}
|
||||
} else {
|
||||
let paywall = document.querySelector('div#ifq-paywall-metered');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let art_hidden = document.querySelector('article[id].cropped');
|
||||
if (art_hidden)
|
||||
art_hidden.classList.remove('cropped');
|
||||
} else
|
||||
header_nofix('div.ifq-post__content', 'div#ifq-paywall-hard');
|
||||
}
|
||||
let ads = 'div.adv, div.st-adunit, div[id^="ifq-adv-"], div.mgbox';
|
||||
hideDOMStyle(ads);
|
||||
let ad_units = document.querySelectorAll('div[id^="div-flx-"] > div[data-adunit]');
|
||||
for (let elem of ad_units)
|
||||
hideDOMElement(elem.parentNode);
|
||||
}
|
||||
|
||||
else if (matchDomain('ilfoglio.it')) {
|
||||
if (window.location.pathname.endsWith('/amp/')) {
|
||||
amp_unhide_subscr_section('amp-ad, [class^="adv-"], div#gmpVideoContainer');
|
||||
} else {
|
||||
amp_redirect('div.paywall');
|
||||
let ads = '.advertisement';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('ilmanifesto.it')) {
|
||||
let paywall = document.querySelector('div[class*="before:bg-gradient-to-t"]');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('article div.prose');
|
||||
if (article) {
|
||||
let filter = /^self\.__next_f\.push\(\[1,"/;
|
||||
let scripts = document.querySelectorAll('script:not([src], [type])');
|
||||
for (let script of scripts) {
|
||||
if (script.text.match(filter) && script.text.includes('canonical_url')) {
|
||||
if (!script.text.includes(window.location.href))
|
||||
refreshCurrentTab();
|
||||
break;
|
||||
}
|
||||
}
|
||||
let source_script = getSourceJsonScript(/^self\.__next_f\.push\(\[1,"\\u003c/);
|
||||
if (source_script) {
|
||||
let source_text = source_script.text.split(filter)[1].split('"])')[0].replace(/\\u003c/g, '<').replace(/\\u003e/g, '>').replace(/\\"/g, '"').replace(/\\n/g, '');
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + source_text + '</div>', 'text/html');
|
||||
let article_new = doc.querySelector('div');
|
||||
let figures = article_new.querySelectorAll('figure[style]');
|
||||
for (let elem of figures)
|
||||
elem.removeAttribute('style');
|
||||
article.innerHTML = '';
|
||||
article.appendChild(article_new);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('ilsole24ore.com')) {
|
||||
header_nofix('div.paywalltext', 'div.lock');
|
||||
waitDOMAttribute('body', 'BODY', 'style', node => node.removeAttribute('style'), true);
|
||||
let ads = 'div.background-adv, div.abox, div.ob-smartfeed-wrapper, div.s24_adb';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (domain = matchDomain(['iltirreno.it', 'lanuovasardegna.it']) || matchDomain(['gazzettadimodena.it', 'gazzettadireggio.it', 'lanuovaferrara.it'])) {
|
||||
if (window.location.pathname.includes('/news/')) {
|
||||
let paywall = document.querySelector('span > img[alt*="Paywall"]');
|
||||
if (paywall) {
|
||||
let header = paywall.parentNode.parentNode;
|
||||
header_nofix(header);
|
||||
removeDOMElement(paywall.parentNode);
|
||||
}
|
||||
window.setTimeout(function () {
|
||||
let banners = document.querySelectorAll('div.MuiSnackbar-root, div.css-16cchgy');
|
||||
removeDOMElement(...banners);
|
||||
}, 1000);
|
||||
}
|
||||
setCookie(/__mtr$/, '', domain, '/', 0);
|
||||
}
|
||||
|
||||
else if (matchDomain(it_ilmessaggero_domains)) {
|
||||
if (window.location.pathname.toLowerCase().includes('/amp/')) {
|
||||
amp_unhide_subscr_section();
|
||||
} else {
|
||||
let noscroll = document.querySelector('html[style]');
|
||||
if (noscroll)
|
||||
noscroll.removeAttribute('style');
|
||||
let ads = 'div.adv_banner, div.inread_adv, div#outbrain';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(it_quotidiano_domains)) {
|
||||
if (window.location.pathname.endsWith('/amp') || window.location.search.startsWith('?amp')) {
|
||||
amp_unhide_access_hide('="c.customGranted"', '="NOT c.customGranted"', 'amp-fx-flying-carpet, .watermark-adv, .amp__watermark');
|
||||
} else {
|
||||
amp_redirect('div[data-testid="paywall-container"], div[class^="Paywall_paywall_"]', '', window.location.pathname + '/amp');
|
||||
let ads = 'div[id^="div-gpt-ad"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('italiaoggi.it')) {
|
||||
let paywall = document.querySelector('div.boxAbb');
|
||||
if (paywall) {
|
||||
let overlay = document.querySelector('div.article-locked-overlay');
|
||||
removeDOMElement(paywall, overlay);
|
||||
let article_locked = document.querySelector('div.article-locked');
|
||||
if (article_locked) {
|
||||
article_locked.classList.remove('article-locked');
|
||||
let json_script = getArticleJsonScript();
|
||||
if (json_script) {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json) {
|
||||
let json_text = json.articleBody;
|
||||
let content = article_locked.querySelector('section');
|
||||
if (json_text && content) {
|
||||
let parser = new DOMParser();
|
||||
json_text = json_text.replace(/&apos;/g, "'").replace(/;/g, '');
|
||||
let doc = parser.parseFromString('<div><section>' + json_text + '</section></div>', 'text/html');
|
||||
let content_new = doc.querySelector('div');
|
||||
content.parentNode.replaceChild(content_new, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (domain = matchDomain(it_gedi_domains)) {
|
||||
let amp = window.location.pathname.match(/\/amp(\/)?$/);
|
||||
if (matchDomain(['huffingtonpost.it', 'lastampa.it'])) {
|
||||
if (window.location.pathname.includes('/news/')) {
|
||||
if (!amp) {
|
||||
let paywall = document.querySelector('iframe[id^="__limio_frame"]');
|
||||
if (paywall) {
|
||||
setCookie(/blaize_session/, '', domain, '/', 0);
|
||||
refreshCurrentTab(false);
|
||||
}
|
||||
let modal = document.querySelector('aside#widgetDP');
|
||||
removeDOMElement(modal);
|
||||
} else
|
||||
ampToHtml();
|
||||
}
|
||||
} else if (matchDomain('repubblica.it')) {
|
||||
if (!amp)
|
||||
amp_redirect('iframe[id^="__limio_frame"]', '', window.location.pathname + 'amp/');
|
||||
else {
|
||||
amp_unhide_subscr_section();
|
||||
if (!mobile)
|
||||
addStyle('img.i-amphtml-fill-content {min-height: 50% !important; min-width: 50% !important;}');
|
||||
let paywall = document.querySelector('div.not_granted__content');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div.story__wrapper');
|
||||
if (article) {
|
||||
let url = window.location.href.split(/[#\?]/)[0].replace(/\/amp\/$/, '');
|
||||
article.before(googleSearchToolLink(url));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!amp) {
|
||||
let paywall = document.querySelector('div#ph-paywall');
|
||||
removeDOMElement(paywall);
|
||||
setCookie(/blaize_session/, '', domain, '/', 0);
|
||||
} else
|
||||
ampToHtml();
|
||||
}
|
||||
let ads = 'div[id^="adv"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('milanofinanza.it')) {
|
||||
let paywall = document.querySelector('div.paywall-content, section.payment');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let json_script = getArticleJsonScript();
|
||||
if (json_script) {
|
||||
try {
|
||||
let json = JSON.parse(json_script.text.replace(/!=/g, '').replace(/!function\(\){[^!]+(\(\);|0;[a-z])/g, ''));
|
||||
if (json) {
|
||||
let json_text = parseHtmlEntities(json.articleBody);
|
||||
let article = document.querySelector('div.article-locked');
|
||||
if (json_text && article) {
|
||||
article.innerHTML = '';
|
||||
let article_new = document.createElement('p');
|
||||
article_new.innerText = json_text;
|
||||
article.appendChild(article_new);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
header_nofix('div.article-locked', '', 'BPC > no fix (json-error)');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('sky.it')) {
|
||||
let paywall = document.querySelector('div.c-paywall');
|
||||
if (paywall && window.location.hostname.match(/^(sport|tg24)\./)) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div > div.c-article-abstract');
|
||||
let json_script = getArticleJsonScript();
|
||||
if (article && json_script) {
|
||||
try {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json) {
|
||||
let json_text = json[0].articleBody;
|
||||
if (json_text) {
|
||||
let par_new = document.createElement('p');
|
||||
par_new.innerText = json_text;
|
||||
article.parentNode.appendChild(par_new);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
let ads = 'div.c-adv';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('tuttosport.com')) {
|
||||
if (!window.location.pathname.startsWith('/amp/')) {
|
||||
let paywall = document.querySelector('div[class^="MainTextTruncated_premium"]');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div > div[class^="MainTextTruncated_truncatedContent"]');
|
||||
if (article) {
|
||||
let json_script = document.querySelector('script#__NEXT_DATA__');
|
||||
if (json_script) {
|
||||
try {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json && json.props.pageProps.news && json.props.pageProps.news.content) {
|
||||
let url_next = json.props.pageProps.news.href;
|
||||
if (url_next && !window.location.pathname.includes(url_next))
|
||||
window.location.href = window.location.pathname;
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + json.props.pageProps.news.content + '</div>', 'text/html');
|
||||
let article_new = doc.querySelector('div');
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
} else
|
||||
refreshCurrentTab();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let ads = 'div[class^="AdUnit_"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
}
|
||||
|
||||
ads_hide();
|
||||
leaky_paywall_unhide();
|
||||
|
||||
}, 1000);
|
||||
|
||||
// General Functions
|
||||
|
||||
// import (see @require)
|
||||
|
||||
})();
|
||||
771
userscript/bpc.nl.user.js
Normal file
771
userscript/bpc.nl.user.js
Normal file
|
|
@ -0,0 +1,771 @@
|
|||
// ==UserScript==
|
||||
// @name Bypass Paywalls Clean - nl/be
|
||||
// @version 4.2.5.4
|
||||
// @description Bypass Paywalls of news sites
|
||||
// @author magnolia1234
|
||||
// @downloadURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.nl.user.js
|
||||
// @updateURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.nl.user.js
|
||||
// @homepageURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @supportURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @license MIT; https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=LICENSE
|
||||
// @noframes
|
||||
// @match *://*.nl/*
|
||||
// @match *://*.businessam.be/*
|
||||
// @match *://*.demorgen.be/*
|
||||
// @match *://*.doorbraak.be/*
|
||||
// @match *://*.flair.be/nl/*
|
||||
// @match *://*.gva.be/*
|
||||
// @match *://*.hbvl.be/*
|
||||
// @match *://*.hln.be/*
|
||||
// @match *://*.humo.be/*
|
||||
// @match *://*.knack.be/*
|
||||
// @match *://*.kw.be/*
|
||||
// @match *://*.libelle.be/*
|
||||
// @match *://*.nieuwsblad.be/*
|
||||
// @match *://*.projectcargojournal.com/*
|
||||
// @match *://*.railfreight.cn/*
|
||||
// @match *://*.railfreight.com/*
|
||||
// @match *://*.railtech.be/*
|
||||
// @match *://*.railtech.com/*
|
||||
// @match *://*.standaard.be/*
|
||||
// @match *://*.taxipro.be/*
|
||||
// @match *://*.tijd.be/*
|
||||
// @connect archive.fo
|
||||
// @connect archive.is
|
||||
// @connect archive.li
|
||||
// @connect archive.md
|
||||
// @connect archive.ph
|
||||
// @connect archive.vn
|
||||
// @grant GM.xmlHttpRequest
|
||||
// @require https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc_func.js
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
//'use strict';
|
||||
|
||||
window.setTimeout(function () {
|
||||
|
||||
var be_mediahuis_domains = ['gva.be', 'hbvl.be', 'nieuwsblad.be', 'standaard.be'];
|
||||
var be_roularta_domains = ['beleggersbelangen.nl', 'flair.be', 'knack.be', 'kw.be', 'libelle.be'];
|
||||
var nl_dpg_adr_domains = ['ad.nl', 'bd.nl', 'bndestem.nl', 'destentor.nl', 'ed.nl', 'gelderlander.nl', 'pzc.nl', 'tubantia.nl'];
|
||||
var nl_dpg_media_domains = ['demorgen.be', 'flair.nl', 'humo.be', 'libelle.nl', 'margriet.nl', 'parool.nl', 'trouw.nl', 'volkskrant.nl'];
|
||||
var nl_mediahuis_region_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'limburger.nl', 'noordhollandsdagblad.nl'];
|
||||
|
||||
if (matchDomain('adformatie.nl')) {
|
||||
document.querySelectorAll('iframe[uc-src]').forEach(e => e.src = e.getAttribute('uc-src'));
|
||||
let ads = 'div.c-ad-slot';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain(be_mediahuis_domains)) {
|
||||
window.setTimeout(function () {
|
||||
let video = document.querySelector('div.video, div[data-testid="article-video"]');
|
||||
func_post = function () {
|
||||
let article = document.querySelector(article_sel);
|
||||
if (article) {
|
||||
if (video) {
|
||||
if (matchDomain(['gva.be', 'nieuwsblad.be'])) {
|
||||
let placeholder = video.querySelector('div[class^="Placeholder_placeholder"]');
|
||||
if (placeholder)
|
||||
placeholder.removeAttribute('class');
|
||||
}
|
||||
let video_new = article.querySelector('div[id$="-streamone"], div[id^="video-player-"], div[id^="player_"]');
|
||||
if (video_new && video_new.parentNode)
|
||||
video_new.parentNode.replaceChild(video, video_new);
|
||||
else {
|
||||
let header = article.querySelector('h1');
|
||||
let br = document.createElement('br');
|
||||
if (header)
|
||||
header.after(br, video, br);
|
||||
}
|
||||
}
|
||||
let errors = document.querySelectorAll('div[height][old-src]:not([src]):has(div#__next_error__)');
|
||||
for (let elem of errors) {
|
||||
let iframe = document.createElement('iframe');
|
||||
iframe.src = elem.getAttribute('old-src');
|
||||
iframe.style = 'width: 100%; height: ' + elem.getAttribute('height') + 'px;';
|
||||
elem.parentNode.replaceChild(iframe, elem);
|
||||
}
|
||||
if (mobile) {
|
||||
if (article_main) {
|
||||
let div_next = document.querySelector('div[id="__next"]');
|
||||
if (div_next)
|
||||
article.style.width = div_next.offsetWidth + 'px';
|
||||
}
|
||||
let lazy_images = article.querySelectorAll('figure img[loading="lazy"][style]');
|
||||
for (let elem of lazy_images)
|
||||
elem.style = 'width: 95%;';
|
||||
let figures = article.querySelectorAll('figure div');
|
||||
for (let elem of figures) {
|
||||
elem.removeAttribute('style');
|
||||
let svg = elem.querySelector('svg');
|
||||
removeDOMElement(svg);
|
||||
}
|
||||
}
|
||||
let pars = article.querySelectorAll('div[style*="font-size"]');
|
||||
if (pars.length < 5)
|
||||
article.before(googleSearchToolLink(url));
|
||||
}
|
||||
}
|
||||
let url = window.location.href;
|
||||
let paywall_sel = 'head > meta[name$="article_ispaidcontent"][content="true"]';
|
||||
let article_sel = 'main > article';
|
||||
let article_main = document.querySelector(article_sel);
|
||||
if (!article_main)
|
||||
article_sel = 'article[role="article"] div[id]';
|
||||
getArchive(url, paywall_sel, '', article_sel);
|
||||
let popup = document.querySelector('div[data-testid="close-popup-button"]');
|
||||
if (popup)
|
||||
popup.click();
|
||||
}, 1500);
|
||||
let ads = 'div[id^="ad_inline-"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('businessam.be')) {
|
||||
let paywall = document.querySelector('div.paywall');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div.text-gradient');
|
||||
if (article) {
|
||||
let scripts = document.querySelectorAll('script:not([src]):not([type])');
|
||||
let content_script;
|
||||
for (let script of scripts) {
|
||||
if (script.text.match(/window\.fullcontent64\s?=\s?"/)) {
|
||||
content_script = script;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (content_script) {
|
||||
try {
|
||||
let content = decode_utf8(atob(content_script.text.split(/window\.fullcontent64\s?=\s?"/)[1].split('";')[0]));
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + content + '</div>', 'text/html');
|
||||
let content_new = doc.querySelector('div');
|
||||
article.parentNode.replaceChild(content_new, article);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('businessinsider.nl')) {
|
||||
getJsonUrl('div.piano-article__paywall', '', 'div.piano-article__content');
|
||||
}
|
||||
|
||||
else if (matchDomain('doorbraak.be')) {
|
||||
window.setTimeout(function () {
|
||||
let plus = document.querySelector('h1 > svg');
|
||||
let article = document.querySelector('div > div.prose');
|
||||
if (plus && article) {
|
||||
let paywall_sel = 'div.paywall';
|
||||
let paywall = document.querySelector(paywall_sel);
|
||||
let pars = article.querySelectorAll('p');
|
||||
if (paywall || pars.length < 2) {
|
||||
removeDOMElement(paywall);
|
||||
waitDOMElement(paywall_sel, 'DIV', removeDOMElement, false);
|
||||
let json_script = document.querySelector('script#__NUXT_DATA__');
|
||||
if (json_script) {
|
||||
try {
|
||||
if (!json_script.text.substr(0, 500).includes(window.location.pathname))
|
||||
refreshCurrentTab();
|
||||
let json = JSON.parse(json_script.text);
|
||||
json = json.filter(x => typeof x === 'string' && x.startsWith('<p>'));
|
||||
let json_text = json[0];
|
||||
if (json_text) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + json_text + '</div>', 'text/html');
|
||||
let content_new = doc.querySelector('div');
|
||||
article.appendChild(content_new);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
else if (matchDomain(be_roularta_domains)) {
|
||||
if (matchDomain('beleggersbelangen.nl')) {
|
||||
let paywall = document.querySelector('div.unlimited-access');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let no_account = document.querySelector('div.no-account');
|
||||
if (no_account)
|
||||
no_account.classList.remove('no-account');
|
||||
let content_inner = document.querySelector('div.content-inner[style]');
|
||||
if (content_inner)
|
||||
content_inner.removeAttribute('style');
|
||||
}
|
||||
} else {
|
||||
let paywall = document.querySelector('div[id*="wall-modal"]');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let html = document.querySelector('html[class]');
|
||||
if (html)
|
||||
html.removeAttribute('class');
|
||||
function roularta_noscroll(node) {
|
||||
node.removeAttribute('style');
|
||||
node.removeAttribute('class');
|
||||
}
|
||||
waitDOMAttribute('html', 'html', 'class', roularta_noscroll, true);
|
||||
let intro = document.querySelectorAll('div.article-body > p, div.article-body > style');
|
||||
removeDOMElement(...intro);
|
||||
let locked = document.querySelector('body.locked');
|
||||
if (locked)
|
||||
locked.classList.remove('locked');
|
||||
}
|
||||
if (!window.navigator.userAgent.toLowerCase().includes('chrome') && !matchDomain(['kw.be']) && window.location.href.match(/\/(\w+-){2,}/)) {
|
||||
let lazy_images = document.querySelectorAll('img[src^="data:image/"][data-lazy-src]');
|
||||
for (let elem of lazy_images) {
|
||||
elem.src = elem.getAttribute('data-lazy-src');
|
||||
}
|
||||
}
|
||||
}
|
||||
let ads = 'div.rmgAd, div.c-header__ad';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('ftm.nl')) {
|
||||
let videos = document.querySelectorAll('div.body > div.video-pp');
|
||||
for (let video of videos) {
|
||||
let video_id_dom = video.querySelector('a.video[data-youtube-id]');
|
||||
if (video_id_dom) {
|
||||
video_new = document.createElement('iframe');
|
||||
video_new.src = 'https://www.youtube.com/embed/' + video_id_dom.getAttribute('data-youtube-id');
|
||||
video_new.style = 'width: 95%; height: 400px; margin: 0px 20px;';
|
||||
video.parentNode.replaceChild(video_new, video);
|
||||
}
|
||||
}
|
||||
let audio_controls = document.querySelectorAll('audio[controls][style]');
|
||||
for (let elem of audio_controls)
|
||||
elem.removeAttribute('style');
|
||||
document.querySelectorAll('div.foldable').forEach(e => e.classList.remove('foldable'));
|
||||
let banners = 'div.banner-pp';
|
||||
hideDOMStyle(banners);
|
||||
}
|
||||
|
||||
else if (matchDomain('groene.nl')) {
|
||||
let url = window.location.href;
|
||||
getArchive(url, 'div#closed-block', '', 'article');
|
||||
let more = pageContains('div.wrapper > h2', 'Verder lezen?');
|
||||
if (more.length) {
|
||||
let link_text = 'https://www.groene.nl/populair';
|
||||
let a_link = document.createElement('a');
|
||||
a_link.href = link_text;
|
||||
a_link.innerText = 'BPC > ' + link_text.split('www.')[1];
|
||||
more[0].parentNode.append(document.createElement('br'), a_link);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(['lc.nl', 'dvhn.nl']) || document.querySelector('head > link[href*=".ndcmediagroep.nl/"]')) {
|
||||
let paywall = document.querySelector('div.signupPlus, div.pw-wrapper:not(.pw-none)');
|
||||
if (paywall && !window.location.pathname.includes('/live-')) {
|
||||
let intro = document.querySelector('div.startPayWall');
|
||||
let html = document.documentElement.outerHTML;
|
||||
if (html.includes('window.__NUXT__=')) {
|
||||
removeDOMElement(paywall, intro);
|
||||
try {
|
||||
let json = html.split('window.__NUXT__=')[1].split('</script>')[0].trim();
|
||||
let json_match = json.includes('type:"article",');
|
||||
if (json_match) {
|
||||
let path_match = window.location.pathname.match(/-(\d+)\./);
|
||||
if (path_match) {
|
||||
let article_id = path_match[1];
|
||||
json_match = json.includes(',id:"' + article_id + '",');
|
||||
if (!json_match && json.match(/[(,]null,/)) {
|
||||
let art_match = json.split(/[(,]null,/)[1].match(new RegExp('-' + article_id + '\\.', 'g'));
|
||||
json_match = art_match && art_match.length > 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!json_match)
|
||||
refreshCurrentTab();
|
||||
else if (json.includes(',body:')) {
|
||||
let nuxt_vars = json.split(/^\(function\(/)[1].split('){')[0].split(',');
|
||||
let nuxt_values = json.split('}}(')[1].split('));')[0].replace(/,(true|false|\d+|{}),/g, ',"$1",').replace(/,(null),/g, ',"$1",').replace(/,(void\s\d),/g, ',"$1",').split(/\\?",\\?"/);
|
||||
function findNuxtText(str, attributes = false) {
|
||||
if (nuxt_vars.length && nuxt_values.length && !(attributes && str.length === 1 && str === str.toUpperCase())) {
|
||||
let index = nuxt_vars.indexOf(str);
|
||||
if (nuxt_values[index])
|
||||
str = nuxt_values[index];
|
||||
}
|
||||
return str;
|
||||
}
|
||||
let intro;
|
||||
let intro_match = json.match(/,leadtext_raw:"([^"]+)",/);
|
||||
let intro_meta_dom = document.querySelector('head > meta[data-hid="description"][content]');
|
||||
if (intro_match || intro_meta_dom) {
|
||||
intro = document.createElement('p');
|
||||
intro.innerText = intro_match ? intro_match[1].replace(/\\u002F/g, '/') : intro_meta_dom.content;
|
||||
intro.style = 'font-weight: bold;';
|
||||
}
|
||||
let json_text = json.split(',body:')[1].split(/,(leadText|brand_key|tts|pianoKeywords):/)[0].replace(/([{,])(\w+)(?=:(["\{\[]|[\w$]{1,2}[,\}]))/g, "$1\"$2\"").replace(/(Image\\":)(\d)([,}])/g, '$1\\"$2\\"$3').replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3");
|
||||
let article = document.querySelector('div.content');
|
||||
if (article) {
|
||||
article.innerHTML = '';
|
||||
if (intro)
|
||||
article.appendChild(intro);
|
||||
let pars = JSON.parse(json_text);
|
||||
function addParText(elem, par_text, add_br = false, attributes = false) {
|
||||
if (par_text) {
|
||||
if (par_text.length <= 2)
|
||||
par_text = findNuxtText(par_text, attributes);
|
||||
let span = document.createElement('span');
|
||||
span.innerText = par_text;
|
||||
elem.appendChild(span);
|
||||
if (add_br)
|
||||
elem.appendChild(document.createElement('br'));
|
||||
}
|
||||
}
|
||||
function addLink(elem, link_text, href, add_br = false) {
|
||||
let par_link = document.createElement('a');
|
||||
par_link.href = href;
|
||||
par_link.innerText = link_text;
|
||||
elem.appendChild(par_link);
|
||||
if (add_br)
|
||||
elem.appendChild(document.createElement('br'));
|
||||
}
|
||||
function addImage(elem, child) {
|
||||
let figure = document.createElement('figure');
|
||||
let img = document.createElement('img');
|
||||
img.src = child.relation.href;
|
||||
figure.appendChild(img);
|
||||
if (child.relation.caption) {
|
||||
if (child.relation.caption.length <= 2)
|
||||
child.relation.caption = findNuxtText(child.relation.caption).replace(/\\"/g, '"').replace(/\\n/g, ' - ').replace(/\\u002F/g, '/');
|
||||
if (child.relation.photographer) {
|
||||
if (child.relation.photographer.length <= 2)
|
||||
child.relation.photographer = findNuxtText(child.relation.photographer).replace(/\\u002F/g, '/');
|
||||
child.relation.caption += ' - ' + child.relation.photographer;
|
||||
}
|
||||
let caption = document.createElement('figcaption');
|
||||
caption.innerText = child.relation.caption;
|
||||
figure.appendChild(caption);
|
||||
}
|
||||
elem.appendChild(figure);
|
||||
}
|
||||
function addChildren(elem, children, add_br = false, attributes = false) {
|
||||
for (let child of children) {
|
||||
if (child.text) {
|
||||
addParText(elem, child.text, add_br, attributes);
|
||||
} else if (child.relation && (child.type === 'img' || child.relation.caption) && child.relation.href) {
|
||||
let img_par = document.createElement('p');
|
||||
addImage(img_par, child);
|
||||
elem.appendChild(img_par);
|
||||
} else if (child.relation && child.relation.link) {
|
||||
if (child.relation.link.length <= 2)
|
||||
child.relation.link = findNuxtText(child.relation.link).replace(/\\u002F/g, '/');
|
||||
if (child.relation.title.length <= 2)
|
||||
child.relation.title = findNuxtText(child.relation.title);
|
||||
addLink(elem, child.relation.title, child.relation.link);
|
||||
} else if (child.children) {
|
||||
if (child.children.length) {
|
||||
for (let item of child.children) {
|
||||
if (item.text) {
|
||||
if ((child.href && child.href.length > 2) || (child.relation && child.relation.follow && child.relation.follow.url)) {
|
||||
if (item.text.length > 2)
|
||||
addLink(elem, item.text, child.href || child.relation.follow.url, add_br);
|
||||
} else
|
||||
addParText(elem, item.text, false, child.attributes && child.attributes.length);
|
||||
} else
|
||||
addChildren(elem, item.children, false, item.attributes && item.attributes.length);
|
||||
}
|
||||
} else
|
||||
elem.appendChild(document.createElement('br'));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let par of pars) {
|
||||
let elem = document.createElement('p');
|
||||
if (par.code) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + par.code + '</div>', 'text/html');
|
||||
elem = doc.querySelector('div');
|
||||
} else if (par.insertbox_head || par.insertbox_text) {
|
||||
if (par.insertbox_head && par.insertbox_head.length > 2)
|
||||
addParText(elem, par.insertbox_head, true);
|
||||
if (par.insertbox_text) {
|
||||
for (let item of par.insertbox_text) {
|
||||
if (item.children)
|
||||
addChildren(elem, item.children, true);
|
||||
}
|
||||
}
|
||||
} else if (par.text) {
|
||||
if (findNuxtText(par.type) !== 'streamer')
|
||||
addParText(elem, par.text);
|
||||
} else if (par.children) {
|
||||
addChildren(elem, par.children);
|
||||
} else if (par.typename.length > 2)
|
||||
console.log(par);
|
||||
if (elem.hasChildNodes()) {
|
||||
article.appendChild(elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
let ads = 'div.top__ad, div.marketingblock-article';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('linda.nl')) {
|
||||
window.setTimeout(function () {
|
||||
let paywall = document.querySelector('div.premium-login-box_loginBox');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div[class*="_loginRequired"]');
|
||||
if (article) {
|
||||
let filter = /^window\.__INITIAL_PROPS__\s?=\s?/;
|
||||
let json_script = getSourceJsonScript(filter);
|
||||
if (json_script) {
|
||||
try {
|
||||
let json = JSON.parse(json_script.text.split(filter)[1]);
|
||||
if (json) {
|
||||
let slug = json.slug;
|
||||
if ((slug && !window.location.pathname.includes(slug)) || !json.viewData)
|
||||
refreshCurrentTab();
|
||||
if (json && json.viewData.article) {
|
||||
function replace_also_read(str) {
|
||||
return str.replace(/{also-read title="([^}]+)" url="([^}]+)" [^}]+"}/g, "<div style='margin: 15px 0px'><a href=\"$2\">Lees ook: $1</a></div>");
|
||||
}
|
||||
article.className = article.className.replace(/[-\w]+_loginRequired/, '');
|
||||
if (json.viewData.article.modules) {
|
||||
let modules = json.viewData.article.modules;
|
||||
article.innerHTML = '';
|
||||
for (let elem of modules) {
|
||||
let type = elem.acf_fc_layout;
|
||||
if (type) {
|
||||
let item = document.createElement('div');
|
||||
if (['body_text', 'intro', 'quote'].includes(type)) {
|
||||
if (elem.text) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div style="margin: 20px;">' + replace_also_read((elem.title ? elem.title : '') + elem.text.replace(/\r\n/g, '<br>')) + '</div>', 'text/html');
|
||||
item = doc.querySelector('div');
|
||||
if (type === 'intro') {
|
||||
let intro = item.querySelector('p');
|
||||
if (intro)
|
||||
intro.style = 'font-weight: bold; ';
|
||||
} else if (type === 'quote')
|
||||
item.style['text-align'] = 'center';
|
||||
article.append(item);
|
||||
}
|
||||
} else if (type === 'image') {
|
||||
let elem_images = elem.images_portrait || elem.images_landscape;
|
||||
if (elem_images && elem_images.length) {
|
||||
for (let img of elem_images) {
|
||||
let url = img.image.sizes.large;
|
||||
let caption_text = img.credits ? img.credits.replace(/(\n|<[^<]*>)/g, '') : '';
|
||||
item = makeFigure(url, caption_text, {style: 'width: 100%;'});
|
||||
article.append(item);
|
||||
}
|
||||
}
|
||||
} else
|
||||
console.log(elem);
|
||||
}
|
||||
}
|
||||
} else if (json.viewData.article.body) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + replace_also_read(json.viewData.article.body) + '</div>', 'text/html');
|
||||
let article_new = doc.querySelector('div');
|
||||
if (article_new) {
|
||||
article.innerHTML = '';
|
||||
article.appendChild(article_new);
|
||||
}
|
||||
} else
|
||||
header_nofix('div.article-content_base');
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
else if (matchDomain(nl_dpg_adr_domains.concat(['hln.be']))) {
|
||||
func_post = function () {
|
||||
let article = document.querySelector(article_sel);
|
||||
if (article) {
|
||||
let shades = article.querySelectorAll('div[style*="background-color"][style*=";width"]');
|
||||
for (let elem of shades)
|
||||
elem.style.width = '85%';
|
||||
let lazy_images = article.querySelectorAll('picture img[loading="lazy"][style]');
|
||||
for (let elem of lazy_images)
|
||||
elem.style = 'width: 95%;';
|
||||
let widgets = article.querySelectorAll('div > div > div[old-src]:not([src])');
|
||||
for (let elem of widgets) {
|
||||
let iframe = document.createElement('iframe');
|
||||
iframe.src = elem.getAttribute('old-src');
|
||||
iframe.style = 'width: 100%; border: none;';
|
||||
if (iframe.src.includes('/widgets/') || iframe.src.includes('/playlists/'))
|
||||
iframe.style.height = '400px';
|
||||
elem.parentNode.replaceChild(iframe, elem);
|
||||
}
|
||||
let errors = article.querySelectorAll('div > div[old-src]:not([src]):has(div#main-frame-error)');
|
||||
for (let elem of errors) {
|
||||
let elem_new = document.createElement('iframe');
|
||||
elem_new.src = elem.getAttribute('old-src');
|
||||
elem_new.style = 'width: 100%; height: 400px; border: none;';
|
||||
elem.parentNode.removeAttribute('style');
|
||||
elem.parentNode.replaceChild(elem_new, elem);
|
||||
}
|
||||
let picture_divs = article.querySelectorAll('picture > div[style*="min-height:"]:has(svg)');
|
||||
for (let elem of picture_divs) {
|
||||
elem.parentNode.removeAttribute('style');
|
||||
removeDOMElement(elem);
|
||||
}
|
||||
let video_scripts = article.querySelectorAll('div > div > script[type="application/ld+json"], article > script[type="application/ld+json"]');
|
||||
for (let elem of video_scripts) {
|
||||
if (elem.text.includes(',"embedUrl":"')) {
|
||||
let iframe = document.createElement('iframe');
|
||||
iframe.src = elem.text.split(',"embedUrl":"')[1].split('"')[0];
|
||||
iframe.style = 'width: 100%; height: 400px;';
|
||||
let container = elem.parentNode;
|
||||
if (elem.parentNode.tagName === 'DIV')
|
||||
container = container.parentNode;
|
||||
container.parentNode.replaceChild(iframe, container);
|
||||
}
|
||||
}
|
||||
}
|
||||
let article_divs = document.querySelectorAll(article_src_sel + ' > div');
|
||||
if (article_divs.length < 3) {
|
||||
let header = document.querySelector(article_sel + ' > header');
|
||||
if (header)
|
||||
header.before(googleSearchToolLink(url));
|
||||
}
|
||||
}
|
||||
let url = window.location.href;
|
||||
let article_sel = 'div#remaining-paid-content';
|
||||
let article_src_sel = 'div#fjs-paywall-intro + div';
|
||||
let article = document.querySelector(article_sel);
|
||||
if (article) {
|
||||
article_src_sel += ', ' + article_sel;
|
||||
getArchive(url, article_sel + '[data-reduced="true"]', {rm_attrib: 'data-reduced'}, article_sel, '', article_src_sel);
|
||||
} else {
|
||||
article_sel = 'article#article-content';
|
||||
article_src_sel += ', ' + article_sel + ' > section';
|
||||
let paywall_sel = article_sel + ' div[data-testid="premium"]';
|
||||
let paywall_action = {rm_attrib: 'data-testid'};
|
||||
if (!document.querySelector(paywall_sel)) { // regwal
|
||||
paywall_sel = article_sel + ' > section[class]:empty';
|
||||
paywall_action = {rm_attrib: 'class'};
|
||||
}
|
||||
getArchive(url, paywall_sel, paywall_action, article_sel + ' > section', '', article_src_sel, article_sel + ' > header');
|
||||
let ads = 'span[style*="background-color:"]:has(> span[style*="min-height:"])';
|
||||
hideDOMStyle(ads, 2);
|
||||
}
|
||||
let ads = 'div.dfp-space';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain(nl_dpg_media_domains)) {
|
||||
setCookie('TID_ID', '', '', '/', 0);
|
||||
let banners = 'aside[data-temptation-position^="ARTICLE_"], div[data-temptation-position^="PAGE_"], div[class^="ad--"], div[id^="article_paragraph_"]';
|
||||
hideDOMStyle(banners);
|
||||
window.setTimeout(function () {
|
||||
let elem_hidden = document.querySelectorAll('[class^="artstyle__"][style="display: none;"]');
|
||||
for (let elem of elem_hidden)
|
||||
elem.removeAttribute('style');
|
||||
}, 500);
|
||||
}
|
||||
|
||||
else if (matchDomain(nl_mediahuis_region_domains)) {
|
||||
let video = document.querySelector('div.video, div[data-testid="article-video"]');
|
||||
func_post = function () {
|
||||
let article = document.querySelector(article_sel);
|
||||
if (article) {
|
||||
if (video) {
|
||||
let video_new = article.querySelector('div[id$="-streamone"], div[id^="video-player-"], div[id^="player_"]');
|
||||
if (video_new && video_new.parentNode)
|
||||
video_new.parentNode.replaceChild(video, video_new);
|
||||
else {
|
||||
let header = article.querySelector('h1');
|
||||
let br = document.createElement('br');
|
||||
if (header)
|
||||
header.after(br, video, br);
|
||||
}
|
||||
}
|
||||
if (mobile) {
|
||||
let div_next = document.querySelector('div[id="__next"]');
|
||||
if (div_next)
|
||||
article.style.width = div_next.offsetWidth - 20 + 'px';
|
||||
let lazy_images = article.querySelectorAll('figure img[loading="lazy"][style]');
|
||||
for (let elem of lazy_images)
|
||||
elem.style = 'width: 95%;';
|
||||
let figures = article.querySelectorAll('figure div');
|
||||
for (let elem of figures) {
|
||||
elem.removeAttribute('style');
|
||||
let svg = elem.querySelector('svg');
|
||||
removeDOMElement(svg);
|
||||
}
|
||||
}
|
||||
if (article.innerText.length < 1000) {
|
||||
let header = article.querySelector('hgroup');
|
||||
if (header)
|
||||
header.before(googleSearchToolLink(url));
|
||||
}
|
||||
}
|
||||
}
|
||||
let paywall_sel = 'head > meta[name$="article_ispaidcontent"][content="true"]';
|
||||
let article_sel = 'main > article';
|
||||
let url = window.location.href;
|
||||
getArchive(url, paywall_sel, '', article_sel);
|
||||
window.setTimeout(function () {
|
||||
let noscroll = document.querySelector('body[class*="style_disable-scroll-popup"]');
|
||||
if (noscroll)
|
||||
noscroll.style = 'position: static !important; overflow: visible !important';
|
||||
}, 500);
|
||||
let banners = 'div[class*="style_popover"]';;
|
||||
hideDOMStyle(banners);
|
||||
}
|
||||
|
||||
else if (matchDomain('nrc.nl')) {
|
||||
setCookie('counter', '', '', '/', 0, true);
|
||||
let banners = 'div[id$="modal__overlay"], div.header__subscribe-bar, div.banner, dialog.dmt-login-modal';
|
||||
hideDOMStyle(banners);
|
||||
}
|
||||
|
||||
else if (matchDomain('telegraaf.nl')) {
|
||||
let url = window.location.href.split(/[#\?]/)[0];
|
||||
window.setTimeout(function () {
|
||||
let paywall_sel = 'div[data-testid="paywall-position-popover"]:not(:empty)';
|
||||
let paywall = document.querySelector(paywall_sel);
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('article');
|
||||
if (article) {
|
||||
let url_postfix = '-30-web';
|
||||
if (window.location.pathname.startsWith('/video/') && document.querySelector('div[data-testid="article-video"]')) {
|
||||
window.location.href = url + url_postfix;
|
||||
} else {
|
||||
let url_src = url + url_postfix;
|
||||
fetch(url_src)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.text().then(html => {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString(html, 'text/html');
|
||||
let article_new = doc.querySelector('article');
|
||||
if (article_new.querySelector('div[class^="gallery_wrapper"], div[id^="player_"], div[data-testid="social-embed-fallbackmessage"], div[class^="map_"]'))
|
||||
window.location.href = url + url_postfix;
|
||||
else
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
let ads = 'div[id^="ad_"], div[class^="scrollable-ads"], iframe#ecommerce-ad-iframe, div[data-pym-src]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain('tijd.be')) {
|
||||
let url = window.location.href;
|
||||
func_post = function () {
|
||||
if (mobile) {
|
||||
document.querySelectorAll('figure img[loading="lazy"][style]').forEach(e => e.style = 'width: 95%;');
|
||||
}
|
||||
let pars = document.querySelectorAll('div[itemprop="articleBody"] > div');
|
||||
if (pars.length) {
|
||||
if (pars.length < 5) {
|
||||
let header = document.querySelector('article header');
|
||||
if (header)
|
||||
header.before(googleSearchToolLink(url));
|
||||
}
|
||||
} else {
|
||||
let main = document.querySelector('main');
|
||||
if (main)
|
||||
main.after(googleSearchToolLink(url));
|
||||
}
|
||||
document.querySelectorAll('[inert]').forEach(e => e.removeAttribute('inert'));
|
||||
}
|
||||
if (matchDomain('belegger.tijd.be')) {
|
||||
if (window.location.pathname.endsWith('.html')) {
|
||||
getArchive(url, 'html.paywalled', {rm_class: 'paywalled'}, 'main');
|
||||
addStyle('body {overflow: auto !important}');
|
||||
}
|
||||
let banner = document.querySelector('div[data-id="react-paywall-auth0"]');
|
||||
removeDOMElement(banner);
|
||||
} else {
|
||||
window.setTimeout(function () {
|
||||
let close_button = document.querySelector('button.ds-modal__top-bar__closebutton');
|
||||
if (close_button)
|
||||
close_button.click();
|
||||
}, 1000);
|
||||
let paywall_sel = 'html.paywall-active';
|
||||
let paywall = document.querySelector(paywall_sel);
|
||||
if (paywall) {
|
||||
if (!window.location.href.includes('/live-blog/'))
|
||||
getArchive(url, paywall_sel, {rm_class: 'paywall-active'}, 'article');
|
||||
else {
|
||||
paywall.classList.remove('paywall-active');
|
||||
let main = document.querySelector('main');
|
||||
if (main)
|
||||
main.after(googleSearchToolLink(url));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('vn.nl')) {
|
||||
let paywall = document.querySelectorAll('section[class^="c-paywall"]');
|
||||
if (paywall.length) {
|
||||
removeDOMElement(...paywall);
|
||||
let article = document.querySelector('div.c-article-content__container');
|
||||
if (article) {
|
||||
let json_script = document.querySelector('script#__NEXT_DATA__');
|
||||
if (json_script) {
|
||||
try {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json && json.props.pageProps.article && json.props.pageProps.article.content) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + json.props.pageProps.article.content + '</div>', 'text/html');
|
||||
let content_new = doc.querySelector('div');
|
||||
article.innerHTML = '';
|
||||
article.appendChild(content_new);
|
||||
let audio = document.querySelector('div.c-author-info__audio-player');
|
||||
if (audio) {
|
||||
if (json.props.pageProps.article.audioplayer.audioFile.node.mediaItemUrl) {
|
||||
let audio_new = document.createElement('audio');
|
||||
audio_new.src = json.props.pageProps.article.audioplayer.audioFile.node.mediaItemUrl;
|
||||
audio_new.style = 'height: 50px; width: 60%;';
|
||||
audio_new.setAttribute('controls', '');
|
||||
audio.parentNode.replaceChild(audio_new, audio);
|
||||
}
|
||||
}
|
||||
} else
|
||||
refreshCurrentTab();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
let noscroll = document.querySelector('html[class]');
|
||||
if (noscroll)
|
||||
noscroll.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
|
||||
ads_hide();
|
||||
leaky_paywall_unhide();
|
||||
|
||||
}, 1000);
|
||||
|
||||
// General Functions
|
||||
|
||||
// import (see @require)
|
||||
|
||||
})();
|
||||
106
userscript/bpc.pl.user.js
Normal file
106
userscript/bpc.pl.user.js
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
// ==UserScript==
|
||||
// @name Bypass Paywalls Clean - pl
|
||||
// @version 4.2.4.0
|
||||
// @description Bypass Paywalls of news sites
|
||||
// @author magnolia1234
|
||||
// @downloadURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.pl.user.js
|
||||
// @updateURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc.pl.user.js
|
||||
// @homepageURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @supportURL https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters
|
||||
// @license MIT; https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=LICENSE
|
||||
// @noframes
|
||||
// @match *://*.auto-swiat.pl/*
|
||||
// @match *://*.businessinsider.com.pl/*
|
||||
// @match *://*.forbes.pl/*
|
||||
// @match *://*.komputerswiat.pl/*
|
||||
// @match *://*.magazyn-kuchnia.pl/*
|
||||
// @match *://*.newsweek.pl/*
|
||||
// @match *://*.onet.pl/*
|
||||
// @match *://*.parkiet.com/*
|
||||
// @match *://*.pb.pl/*
|
||||
// @match *://*.rp.pl/*
|
||||
// @match *://*.wyborcza.biz/*
|
||||
// @match *://*.wyborcza.pl/*
|
||||
// @match *://*.wysokieobcasy.pl/*
|
||||
// @connect archive.fo
|
||||
// @connect archive.is
|
||||
// @connect archive.li
|
||||
// @connect archive.md
|
||||
// @connect archive.ph
|
||||
// @connect archive.vn
|
||||
// @grant GM.xmlHttpRequest
|
||||
// @require https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=userscript/bpc_func.js
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
//'use strict';
|
||||
|
||||
window.setTimeout(function () {
|
||||
|
||||
var pl_ringier_domains = ['auto-swiat.pl', 'businessinsider.com.pl', 'forbes.pl', 'komputerswiat.pl', 'newsweek.pl', 'onet.pl'];
|
||||
|
||||
if (matchDomain('pb.pl')) {
|
||||
let paywall = document.querySelector('div.paywall');
|
||||
if (paywall) {
|
||||
paywall.classList.remove('paywall');
|
||||
let article_hidden = paywall.querySelector('section.o-article-content');
|
||||
if (article_hidden)
|
||||
article_hidden.removeAttribute('class');
|
||||
let loader = document.querySelector('div.o-piano-template-loader-box');
|
||||
removeDOMElement(loader);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(pl_ringier_domains)) {
|
||||
if (matchDomain('businessinsider.com.pl')) {
|
||||
let paywall = document.querySelector('div#content-premium-offer');
|
||||
removeDOMElement(paywall);
|
||||
}
|
||||
let premium = document.querySelector('div.contentPremium[style]');
|
||||
if (premium) {
|
||||
premium.removeAttribute('class');
|
||||
premium.removeAttribute('style');
|
||||
}
|
||||
let ads = 'div.adPlaceholder , div[class^="Ad"][class*="Placeholder_"], div[data-placeholder-caption], div[data-run-module$=".floatingAd"], aside[data-ad-container], aside.adsContainer, [class^="pwAds"], .hide-for-paying, div.onet-ad, div.bottomBar, ad-default';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
else if (matchDomain(['rp.pl', 'parkiet.com'])) {
|
||||
let paywall = document.querySelector('div.paywallComp');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('div.article--content');
|
||||
if (article) {
|
||||
let url = window.location.href;
|
||||
article.firstChild.before(googleSearchToolLink(url));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(['wyborcza.biz', 'wyborcza.pl', 'wysokieobcasy.pl', 'magazyn-kuchnia.pl'])) {
|
||||
func_post = function () {
|
||||
let block_quotes = document.querySelectorAll('blockquote > a[href]');
|
||||
for (let elem of block_quotes) {
|
||||
if (!elem.innerText.trim())
|
||||
elem.innerText = elem.href;
|
||||
}
|
||||
let empty_spans = document.querySelectorAll('figure > a > span:empty');
|
||||
removeDOMElement(...empty_spans);
|
||||
header_nofix('div.mrf-article-body', 'span[style*="linear-gradient"]', 'BPC > no archive-fix');
|
||||
}
|
||||
let url = window.location.href;
|
||||
getArchive(url, 'div.article--content-fadeout', {rm_attrib: 'class'}, 'div.container[class*="pt"]', '', 'div.body > div:not([style*="background-color:"]):not([old-position]):not([name]):not([id])');
|
||||
let ads = 'div[id^="adUnit"], div[id^="ads-"]';
|
||||
hideDOMStyle(ads);
|
||||
}
|
||||
|
||||
ads_hide();
|
||||
leaky_paywall_unhide();
|
||||
|
||||
}, 1000);
|
||||
|
||||
// General Functions
|
||||
|
||||
// import (see @require)
|
||||
|
||||
})();
|
||||
852
userscript/bpc_func.js
Normal file
852
userscript/bpc_func.js
Normal file
|
|
@ -0,0 +1,852 @@
|
|||
//"use strict";
|
||||
var func_post;
|
||||
var fetch_headers = {};
|
||||
var domain;
|
||||
var mobile = window.navigator.userAgent.toLowerCase().includes('mobile');
|
||||
var csDoneOnce;
|
||||
var cs_param = {};
|
||||
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
if (element)
|
||||
element.remove();
|
||||
}
|
||||
}
|
||||
|
||||
function hideDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
if (element)
|
||||
element.style = 'display:none !important;';
|
||||
}
|
||||
}
|
||||
|
||||
function hideDOMStyle(selector, id = 1) {
|
||||
let style = document.querySelector('head > style#ext'+ id);
|
||||
if (!style && document.head) {
|
||||
let sheet = document.createElement('style');
|
||||
sheet.id = 'ext' + id;
|
||||
sheet.innerText = selector + ' {display: none !important;}';
|
||||
document.head.appendChild(sheet);
|
||||
}
|
||||
}
|
||||
|
||||
function addStyle(css, id = 1) {
|
||||
let style = document.querySelector('head > style#add'+ id);
|
||||
if (!style && document.head) {
|
||||
let sheet = document.createElement('style');
|
||||
sheet.id = 'add' + id;
|
||||
sheet.innerText = css;
|
||||
document.head.appendChild(sheet);
|
||||
}
|
||||
}
|
||||
|
||||
function waitDOMElement(selector, tagName = '', callback, multiple = false) {
|
||||
new window.MutationObserver(function (mutations) {
|
||||
for (let mutation of mutations) {
|
||||
for (let node of mutation.addedNodes) {
|
||||
if (!tagName || (node.tagName === tagName)) {
|
||||
if (node.matches(selector)) {
|
||||
callback(node);
|
||||
if (!multiple)
|
||||
this.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}).observe(document, {
|
||||
subtree: true,
|
||||
childList: true
|
||||
});
|
||||
}
|
||||
|
||||
function waitDOMAttribute(selector, tagName = '', attributeName = '', callback, multiple = false) {
|
||||
let targetNode = document.querySelector(selector);
|
||||
if (!targetNode)
|
||||
return;
|
||||
new window.MutationObserver(function (mutations) {
|
||||
for (let mutation of mutations) {
|
||||
if (mutation.target.attributes[attributeName]) {
|
||||
callback(mutation.target);
|
||||
if (!multiple)
|
||||
this.disconnect();
|
||||
}
|
||||
}
|
||||
}).observe(targetNode, {
|
||||
attributes: true,
|
||||
attributeFilter: [attributeName]
|
||||
});
|
||||
}
|
||||
|
||||
function matchDomain(domains, hostname = window.location.hostname) {
|
||||
if (typeof domains === 'string')
|
||||
domains = [domains];
|
||||
return domains.find(domain => hostname === domain || hostname.endsWith('.' + domain)) || false;
|
||||
}
|
||||
|
||||
function urlHost(url) {
|
||||
if (/^http/.test(url)) {
|
||||
try {
|
||||
return new URL(url).hostname;
|
||||
} catch (e) {
|
||||
console.log(`url not valid: ${url} error: ${e}`);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
function matchUrlDomain(domains, url) {
|
||||
return matchDomain(domains, urlHost(url));
|
||||
}
|
||||
|
||||
function makeFigure(url, caption_text, img_attrib = {}, caption_attrib = {}) {
|
||||
let elem = document.createElement('figure');
|
||||
let img = document.createElement('img');
|
||||
img.src = url;
|
||||
for (let attrib in img_attrib)
|
||||
if (img_attrib[attrib])
|
||||
img.setAttribute(attrib, img_attrib[attrib]);
|
||||
elem.appendChild(img);
|
||||
if (caption_text) {
|
||||
let caption = document.createElement('figcaption');
|
||||
for (let attrib in caption_attrib)
|
||||
if (caption_attrib[attrib])
|
||||
caption.setAttribute(attrib, caption_attrib[attrib]);
|
||||
let cap_par = document.createElement('p');
|
||||
cap_par.innerText = caption_text;
|
||||
caption.appendChild(cap_par);
|
||||
elem.appendChild(caption);
|
||||
}
|
||||
return elem;
|
||||
}
|
||||
|
||||
function header_nofix(header, cond_sel = '', msg = 'BPC > no fix') {
|
||||
if (header && typeof header === 'string')
|
||||
header = document.querySelector(header);
|
||||
if (header && !document.querySelector('div#bpc_nofix')) {
|
||||
if (cond_sel) {
|
||||
let elem = document.querySelectorAll(cond_sel);
|
||||
if (elem.length)
|
||||
removeDOMElement(...elem);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
let nofix_div = document.createElement('div');
|
||||
nofix_div.id = 'bpc_nofix';
|
||||
nofix_div.style = 'margin: 20px; font-size: 20px; font-weight: bold; color: red;';
|
||||
nofix_div.innerText = msg;
|
||||
header.before(nofix_div);
|
||||
}
|
||||
}
|
||||
|
||||
function clearPaywall(paywall, paywall_action) {
|
||||
if (paywall) {
|
||||
if (!paywall_action)
|
||||
removeDOMElement(...paywall);
|
||||
else {
|
||||
for (let elem of paywall) {
|
||||
if (paywall_action.rm_class)
|
||||
elem.classList.remove(paywall_action.rm_class);
|
||||
else if (paywall_action.rm_attrib)
|
||||
elem.removeAttribute(paywall_action.rm_attrib);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getArticleSrc(url, url_src, proxy, base64, selector, text_fail = '', selector_source = selector, selector_archive = selector) {
|
||||
let url_fetch = url_src || url;
|
||||
GM.xmlHttpRequest({
|
||||
method: "GET",
|
||||
url: url_fetch,
|
||||
headers: fetch_headers,
|
||||
onload: function (response) {
|
||||
let html = response.responseText;
|
||||
if (proxy && base64) {
|
||||
html = decode_utf8(atob(html));
|
||||
selector_source = 'body';
|
||||
}
|
||||
let recursive;
|
||||
if (url.startsWith('https://archive.')) {
|
||||
if (url_fetch.includes('/https')) {
|
||||
if (html.includes('<div class="TEXT-BLOCK"')) {
|
||||
url_src = html.split('<div class="TEXT-BLOCK"')[1].split('</div>')[0].split('href="')[1].split('"')[0];
|
||||
getArticleSrc(url, url_src, proxy, base64, selector, text_fail, selector_source, selector_archive);
|
||||
recursive = true;
|
||||
} else
|
||||
html = '';
|
||||
}
|
||||
}
|
||||
if (!recursive)
|
||||
replaceDomElementExtSrc(url, url_src, html, proxy, base64, selector, text_fail, selector_source, selector_archive);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getArchive(url, paywall_sel, paywall_action = '', selector, text_fail = '', selector_source = selector, selector_archive = selector) {
|
||||
let url_archive = 'https://' + archiveRandomDomain() + '/' + url.split(/[#\?]/)[0];
|
||||
let paywall = document.querySelectorAll(paywall_sel);
|
||||
if (paywall.length) {
|
||||
clearPaywall(paywall, paywall_action);
|
||||
replaceDomElementExt(url_archive, true, false, selector, text_fail, selector_source, selector_archive);
|
||||
}
|
||||
}
|
||||
|
||||
function getExtFetch(url, json_key = '', headers = {}, callback = '', args = []) {
|
||||
GM.xmlHttpRequest({
|
||||
method: "GET",
|
||||
url: url,
|
||||
headers: headers,
|
||||
onload: function (response) {
|
||||
let html = response.responseText;
|
||||
if (json_key) {
|
||||
try {
|
||||
let json = JSON.parse(html);
|
||||
if (json)
|
||||
html = getNestedKeys(json, json_key);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
callback(url, html, ...args);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var selector_level = false;
|
||||
function replaceDomElementExt(url, proxy, base64, selector, text_fail = '', selector_source = selector, selector_archive = selector) {
|
||||
let article = document.querySelector(selector);
|
||||
if (!article)
|
||||
return;
|
||||
if (proxy) {
|
||||
if (!text_fail) {
|
||||
if (url.startsWith('https://archive.'))
|
||||
text_fail = 'BPC > Try for full article text (no need to report issue for external site):\r\n';
|
||||
else if (!matchUrlDomain(window.location.hostname, url))
|
||||
text_fail = 'BPC > failed to load from external site:\r\n';
|
||||
}
|
||||
getArticleSrc(url, '', proxy, base64, selector, text_fail, selector_source, selector_archive);
|
||||
} else {
|
||||
fetch(url, {headers: fetch_headers})
|
||||
.then(response => {
|
||||
let article = document.querySelector(selector);
|
||||
if (response.ok) {
|
||||
response.text().then(html => {
|
||||
replaceDomElementExtSrc(url, '', html, false, base64, selector, text_fail, selector_source);
|
||||
});
|
||||
} else {
|
||||
replaceTextFail(url, article, proxy, text_fail);
|
||||
}
|
||||
}).catch(function (err) {
|
||||
replaceTextFail(url, article, proxy, text_fail);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getSelectorLevel(selector) {
|
||||
if (selector.replace(/,\s+/g, ',').match(/[>\s]+/) && !selector.includes(':has(>'))
|
||||
selector = selector.replace(/,\s+/g, ',').split(',').map(x => x.match(/[>\s]+/) ? x + ', ' + x.split(/[>\s]+/).pop() : x).join(', ');
|
||||
return selector;
|
||||
}
|
||||
|
||||
function replaceDomElementExtSrc(url, url_src, html, proxy, base64, selector, text_fail = '', selector_source = selector, selector_archive = selector) {
|
||||
let article = document.querySelector(selector);
|
||||
let article_link = document.querySelector(selector_archive);
|
||||
let no_content_msg = ' | no article content found! | :';
|
||||
if (html) {
|
||||
if (!proxy && base64) {
|
||||
html = decode_utf8(atob(html));
|
||||
selector_source = 'body';
|
||||
}
|
||||
let parser = new DOMParser();
|
||||
window.setTimeout(function () {
|
||||
if (url.startsWith('https://archive.') && url_src) {
|
||||
let domain_archive = url.match(/^https:\/\/(archive\.\w{2})/)[1];
|
||||
let pathname = new URL(url_src).pathname;
|
||||
html = html.replace(new RegExp('https:\\/\\/' + domain_archive.replace('.', '\\.') + '\\/o\\/\\w+\\/', 'g'), '').replace(new RegExp("(src=\"|background-image:url\\(')" + pathname.replace('/', '\\/'), 'g'), "$1" + 'https://' + domain_archive + pathname);
|
||||
}
|
||||
let doc = parser.parseFromString(html, 'text/html');
|
||||
if (selector_level)
|
||||
selector_source = getSelectorLevel(selector_source);
|
||||
let article_new = doc.querySelector(selector_source);
|
||||
if (article_new) {
|
||||
if (article && article.parentNode) {
|
||||
if (url.startsWith('https://archive.')) {
|
||||
let arch_dom = (selector_archive !== selector) ? (article_new.querySelector(selector_archive) || document.querySelector(selector_archive)) : article_new;
|
||||
if (arch_dom) {
|
||||
if (arch_dom.firstChild)
|
||||
arch_dom = arch_dom.firstChild;
|
||||
let arch_div = document.createElement('div');
|
||||
arch_div.appendChild(archiveLink_renew(url_src));
|
||||
arch_div.appendChild(archiveLink(window.location.href.split(/[#\?]/)[0], 'BPC > Full article text fetched from (no need to report issue for external site):\r\n'));
|
||||
arch_div.style = 'margin: 0px 0px 50px;';
|
||||
arch_dom.before(arch_div);
|
||||
}
|
||||
let targets = article_new.querySelectorAll('a[target="_blank"][href^="' + window.location.origin + '"]');
|
||||
for (let elem of targets)
|
||||
elem.removeAttribute('target');
|
||||
let invalid_links = article_new.querySelectorAll('link[rel*="preload"]:not([href])');
|
||||
removeDOMElement(...invalid_links);
|
||||
}
|
||||
window.setTimeout(function () {
|
||||
if (article.parentNode) {
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
if (func_post)
|
||||
func_post();
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
} else
|
||||
replaceTextFail(url, article_link, proxy, text_fail.replace(':', no_content_msg));
|
||||
}, 200);
|
||||
} else {
|
||||
replaceTextFail(url, article_link, proxy, url_src ? text_fail.replace(':', no_content_msg) : text_fail);
|
||||
}
|
||||
}
|
||||
|
||||
function replaceTextFail(url, article, proxy, text_fail) {
|
||||
if (text_fail && article) {
|
||||
let text_fail_div = document.createElement('div');
|
||||
text_fail_div.id = 'bpc_fail';
|
||||
text_fail_div.setAttribute('style', 'margin: 0px 50px; font-weight: bold; color: red;');
|
||||
text_fail_div.appendChild(document.createTextNode(text_fail));
|
||||
if (proxy) {
|
||||
if (url.startsWith('https://archive.')) {
|
||||
text_fail_div = archiveLink(url.replace(/^https:\/\/archive\.\w{2}\//, ''), text_fail);
|
||||
} else {
|
||||
let a_link = document.createElement('a');
|
||||
a_link.innerText = url;
|
||||
a_link.href = url;
|
||||
a_link.target = '_blank';
|
||||
text_fail_div.appendChild(a_link);
|
||||
}
|
||||
}
|
||||
if (article.firstChild)
|
||||
article.firstChild.before(text_fail_div);
|
||||
else
|
||||
article.appendChild(text_fail_div);
|
||||
}
|
||||
}
|
||||
|
||||
function amp_images_replace() {
|
||||
window.setTimeout(function () {
|
||||
let amp_images = document.querySelectorAll('figure amp-img[src^="http"]');
|
||||
for (let amp_image of amp_images) {
|
||||
let elem = document.createElement('img');
|
||||
elem.src = amp_image.getAttribute('src');
|
||||
elem.alt = amp_image.getAttribute('alt');
|
||||
elem.style = 'width: 100%;';
|
||||
amp_image.parentNode.replaceChild(elem, amp_image);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function amp_iframes_replace(weblink = false, source = '') {
|
||||
let amp_iframes = document.querySelectorAll('amp-iframe' + (source ? '[src*="' + source + '"]' : ''));
|
||||
let par, elem;
|
||||
for (let amp_iframe of amp_iframes) {
|
||||
if (!weblink) {
|
||||
if (amp_iframe.offsetHeight > 10) {
|
||||
elem = document.createElement('iframe');
|
||||
elem.src = amp_iframe.getAttribute('src').replace(/^http:/, 'https:');
|
||||
elem.style = 'height: ' + amp_iframe.offsetHeight + 'px; width: 100%; border: 0px;';
|
||||
if (amp_iframe.getAttribute('sandbox'))
|
||||
elem.sandbox = amp_iframe.getAttribute('sandbox');
|
||||
amp_iframe.parentNode.replaceChild(elem, amp_iframe);
|
||||
}
|
||||
} else {
|
||||
par = document.createElement('p');
|
||||
par.style = 'margin: 20px 0px;';
|
||||
elem = document.createElement('a');
|
||||
elem.innerText = 'Media-link';
|
||||
elem.setAttribute('href', amp_iframe.getAttribute('src'));
|
||||
elem.setAttribute('target', '_blank');
|
||||
par.appendChild(elem);
|
||||
amp_iframe.parentNode.replaceChild(par, amp_iframe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function amp_redirect_not_loop(amphtml) {
|
||||
if (!check_loop()) {
|
||||
window.location.href = amphtml.href;
|
||||
} else {
|
||||
let header = (document.body && document.body.firstChild) || document.documentElement;
|
||||
header_nofix(header, '', 'BPC > redirect to amp failed (disable amp-to-html extension/add-on or browser setting)');
|
||||
}
|
||||
}
|
||||
|
||||
function amp_redirect(paywall_sel, paywall_action = '', amp_url = '') {
|
||||
let paywall = document.querySelectorAll(paywall_sel);
|
||||
let amphtml = document.querySelector('head > link[rel="amphtml"]');
|
||||
if (!amphtml && amp_url)
|
||||
amphtml = {href: amp_url};
|
||||
if (paywall.length && amphtml) {
|
||||
clearPaywall(paywall, paywall_action);
|
||||
amp_redirect_not_loop(amphtml);
|
||||
}
|
||||
}
|
||||
|
||||
function amp_unhide_subscr_section(amp_ads_sel = '', replace_iframes = true, amp_iframe_link = false, source = '') {
|
||||
let preview = document.querySelectorAll('[subscriptions-section="content-not-granted"]');
|
||||
removeDOMElement(...preview);
|
||||
let subscr_section = document.querySelectorAll('[subscriptions-section="content"]');
|
||||
for (let elem of subscr_section)
|
||||
elem.removeAttribute('subscriptions-section');
|
||||
if (amp_ads_sel)
|
||||
hideDOMStyle(amp_ads_sel, 5);
|
||||
if (replace_iframes)
|
||||
amp_iframes_replace(amp_iframe_link, source);
|
||||
}
|
||||
|
||||
function amp_unhide_access_hide(amp_access = '', amp_access_not = '', amp_ads_sel = '', replace_iframes = true, amp_iframe_link = false, source = '') {
|
||||
let access_hide = document.querySelectorAll('[amp-access' + amp_access + '][amp-access-hide]:not([amp-access="error"], [amp-access^="message"], .piano)');
|
||||
for (let elem of access_hide)
|
||||
elem.removeAttribute('amp-access-hide');
|
||||
if (amp_access_not) {
|
||||
let amp_access_not_dom = document.querySelectorAll('[amp-access' + amp_access_not + ']');
|
||||
removeDOMElement(...amp_access_not_dom);
|
||||
}
|
||||
if (amp_ads_sel)
|
||||
hideDOMStyle(amp_ads_sel, 6);
|
||||
if (replace_iframes)
|
||||
amp_iframes_replace(amp_iframe_link, source);
|
||||
}
|
||||
|
||||
function ampToHtml() {
|
||||
window.setTimeout(function () {
|
||||
let canonical = document.querySelector('head > link[rel="canonical"][href]');
|
||||
if (canonical)
|
||||
window.location.href = canonical.href;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function check_loop(interval = 2000) {
|
||||
let loop = true;
|
||||
let loop_date = Number(sessionStorage.getItem('###_loop'));
|
||||
if (!(loop_date && (Date.now() - loop_date < interval))) {
|
||||
sessionStorage.setItem('###_loop', Date.now());
|
||||
loop = false;
|
||||
}
|
||||
return loop;
|
||||
}
|
||||
|
||||
function refreshCurrentTab(not_loop = true, not_loop_msg = true) {
|
||||
if (!not_loop || !check_loop(5000)) {
|
||||
window.setTimeout(function () {
|
||||
window.location.reload(true);
|
||||
}, 500);
|
||||
} else if (not_loop_msg) {
|
||||
let header = (document.body && document.body.firstChild) || document.documentElement;
|
||||
header_nofix(header, '', 'BPC > refresh loop stopped');
|
||||
}
|
||||
}
|
||||
|
||||
function archiveRandomDomain() {
|
||||
let tld_array = ['fo', 'is', 'li', 'md', 'ph', 'vn'];
|
||||
let tld = tld_array[randomInt(6)];
|
||||
return 'archive.' + tld;
|
||||
}
|
||||
|
||||
function archiveLink(url, text_fail = 'BPC > Try for full article text (no need to report issue for external site):\r\n') {
|
||||
return externalLink(['archive.today', archiveRandomDomain()], 'https://{domain}?run=1&url={url}', url, text_fail);
|
||||
}
|
||||
|
||||
function archiveLink_renew(url, text_fail = 'BPC > Only use to renew if text is incomplete or updated:\r\n') {
|
||||
return externalLink([new URL(url).hostname], '{url}/again?url=' + window.location.href.split(/[#\?]/)[0], url, text_fail);
|
||||
}
|
||||
|
||||
function googleSearchToolLink(url, text_fail = 'BPC > Try for full article text (test url & copy html (tab) code to [https://codebeautify.org/htmlviewer]):\r\n') {
|
||||
return externalLink(['search.google.com'], 'https://search.google.com/test/rich-results?url={url}', encodeURIComponent(url), text_fail);
|
||||
}
|
||||
|
||||
function freediumLink(url, text_fail = 'BPC > Try for full article text:\r\n') {
|
||||
return externalLink(['freedium.cfd'], 'https://{domain}/{url}', url, text_fail);
|
||||
}
|
||||
|
||||
function readMediumLink(url, text_fail = 'BPC > Try for full article text:\r\n') {
|
||||
return externalLink(['readmedium.com'], 'https://{domain}/{url}', url, text_fail);
|
||||
}
|
||||
|
||||
function externalLink(domains, ext_url_templ, url, text_fail = 'BPC > Full article text:\r\n') {
|
||||
let text_fail_div = document.createElement('div');
|
||||
text_fail_div.id = 'bpc_archive';
|
||||
text_fail_div.setAttribute('style', 'margin: 20px; font-size: 20px; font-weight: bold; color: red;');
|
||||
let parser = new DOMParser();
|
||||
text_fail = text_fail.replace(/\[(?<url>[^\]]+)\]/g, function (match, url) {
|
||||
return "<a href='" + url + "' target='_blank' style='color: red'>" + new URL(url).hostname + "</a>";
|
||||
});
|
||||
let doc = parser.parseFromString('<span>' + text_fail + '</span>', 'text/html');
|
||||
let elem = doc.querySelector('span');
|
||||
text_fail_div.appendChild(elem);
|
||||
for (let domain of domains) {
|
||||
let ext_url = ext_url_templ.replace('{domain}', domain).replace('{url}', url.split('?')[0]);
|
||||
let a_link = document.createElement('a');
|
||||
a_link.innerText = domain;
|
||||
a_link.href = ext_url;
|
||||
a_link.target = '_blank';
|
||||
text_fail_div.appendChild(document.createTextNode(' | '));
|
||||
text_fail_div.appendChild(a_link);
|
||||
}
|
||||
return text_fail_div;
|
||||
}
|
||||
|
||||
function removeClassesByPrefix(el, prefix) {
|
||||
let el_classes = el.classList;
|
||||
for (let el_class of el_classes) {
|
||||
if (el_class.startsWith(prefix))
|
||||
el_classes.remove(el_class);
|
||||
}
|
||||
}
|
||||
|
||||
function removeClassesList(list) {
|
||||
for (let class_item of list) {
|
||||
let elems = document.querySelectorAll('.' + class_item);
|
||||
for (let elem of elems)
|
||||
elem.classList.remove(class_item);
|
||||
}
|
||||
}
|
||||
|
||||
function cookieExists(name) {
|
||||
return document.cookie.split(';').some(function (item) {
|
||||
return item.trim().indexOf(name + '=') === 0
|
||||
})
|
||||
}
|
||||
|
||||
function matchCookies(name) {
|
||||
return document.cookie.split(';').filter(x => x.trim().match(name)).map(y => y.split('=')[0].trim())
|
||||
}
|
||||
|
||||
function setCookie(names, value, domain = '', path = '/', days = 0, localstorage_hold = false) {
|
||||
var max_age = days * 24 * 60 * 60;
|
||||
let ck_names = Array.isArray(names) ? names : [];
|
||||
if (names instanceof RegExp)
|
||||
ck_names = matchCookies(names);
|
||||
else if (typeof names === 'string')
|
||||
ck_names = [names];
|
||||
for (let ck_name of ck_names) {
|
||||
document.cookie = ck_name + "=" + (value || "") + (domain ? "; domain=" + domain : '') + (path ? "; path=" + path : '') + "; max-age=" + max_age;
|
||||
}
|
||||
if (!localstorage_hold) {
|
||||
window.localStorage.clear();
|
||||
window.sessionStorage.clear();
|
||||
}
|
||||
}
|
||||
|
||||
function insert_script(func, insertAfterDom) {
|
||||
let bpc_script = document.querySelector('script#bpc_script');
|
||||
if (!bpc_script) {
|
||||
let script = document.createElement('script');
|
||||
script.setAttribute('id', 'bpc_script');
|
||||
script.appendChild(document.createTextNode('(' + func + ')();'));
|
||||
let insertAfter = insertAfterDom ? insertAfterDom : (document.body || document.head || document.documentElement);
|
||||
insertAfter.appendChild(script);
|
||||
}
|
||||
}
|
||||
|
||||
function getSourceJsonScript(filter, attributes = ':not([src], [type])') {
|
||||
if (typeof filter === 'string')
|
||||
filter = new RegExp(filter);
|
||||
let scripts = document.querySelectorAll('script' + attributes);
|
||||
for (let script of scripts) {
|
||||
if (script.text.match(filter))
|
||||
return script;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getArticleJsonScript() {
|
||||
let scripts = document.querySelectorAll('script[type="application/ld+json"]');
|
||||
let json_script;
|
||||
for (let script of scripts) {
|
||||
if (script.innerText.match(/"(articlebody|text)":/i)) {
|
||||
json_script = script;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return json_script;
|
||||
}
|
||||
|
||||
function restorePugpigLink(node, art_link_sel = '') {
|
||||
let art_link = !art_link_sel ? node : node.querySelector(art_link_sel);
|
||||
if (art_link)
|
||||
art_link.onmousedown = x => window.location.href = art_link.href;
|
||||
}
|
||||
|
||||
function restorePugpigPage() {
|
||||
let art_link_sel = 'a.pp-widget-article, a.pp-related__link';
|
||||
document.querySelectorAll(art_link_sel).forEach(e => restorePugpigLink(e));
|
||||
waitDOMElement(art_link_sel, 'A', restorePugpigLink, true);
|
||||
waitDOMElement('li[class^="collection_type-"]', 'LI', node => restorePugpigLink(node, art_link_sel), true);
|
||||
let modal = 'section.modal';
|
||||
hideDOMStyle(modal);
|
||||
let paywall = document.querySelector('div.paywall');
|
||||
if (paywall)
|
||||
refreshCurrentTab();
|
||||
}
|
||||
|
||||
function getArticleQuintype() {
|
||||
let article_new;
|
||||
let json_script = document.querySelector('script#static-page');
|
||||
if (json_script) {
|
||||
try {
|
||||
article_new = document.createElement('div');
|
||||
let parser = new DOMParser();
|
||||
let json = JSON.parse(json_script.text);
|
||||
let slug = decodeURIComponent(json.qt.data.story.slug);
|
||||
if (slug && !decodeURIComponent(window.location.pathname).includes(slug))
|
||||
refreshCurrentTab();
|
||||
let pars = json.qt.data.story.cards;
|
||||
for (let par of pars) {
|
||||
let story_elements = par['story-elements'];
|
||||
for (let elem of story_elements) {
|
||||
let par_elem;
|
||||
if (['text', 'title'].includes(elem.type) && elem.text) {
|
||||
let doc = parser.parseFromString('<div style="margin: 25px 0px">' + elem.text + '</div>', 'text/html');
|
||||
par_elem = doc.querySelector('div');
|
||||
} else if (elem.type === 'image') {
|
||||
if (elem['image-s3-key']) {
|
||||
par_elem = document.createElement('figure');
|
||||
let img = document.createElement('img');
|
||||
img.src = 'https://media.assettype.com/' + elem['image-s3-key'];
|
||||
par_elem.appendChild(img);
|
||||
if (elem.title) {
|
||||
let caption = document.createElement('figcaption');
|
||||
if (elem.title.includes('</')) {
|
||||
let doc = parser.parseFromString('<div>' + elem.title + '</div>', 'text/html');
|
||||
caption.appendChild(doc.querySelector('div'));
|
||||
} else
|
||||
caption.innerText = elem.title;
|
||||
par_elem.appendChild(caption);
|
||||
}
|
||||
}
|
||||
} else if (elem.type === 'jsembed') {
|
||||
if (elem.subtype === 'tweet') {
|
||||
if (elem.metadata && elem.metadata['tweet-url']) {
|
||||
par_elem = document.createElement('a');
|
||||
par_elem.href = par_elem.innerText = elem.metadata['tweet-url'];
|
||||
par_elem.target = '_blank';
|
||||
} else
|
||||
console.log(elem);
|
||||
}
|
||||
} else if (elem.type === 'youtube-video') {
|
||||
if (elem['embed-url']) {
|
||||
par_elem = document.createElement('iframe');
|
||||
par_elem.src = elem['embed-url'];
|
||||
par_elem.style = 'width: 100%; height: 400px;';
|
||||
}
|
||||
} else if (elem.type === 'file') {
|
||||
if (elem.url && elem['file-name']) {
|
||||
par_elem = document.createElement('a');
|
||||
par_elem.href = elem.url;
|
||||
par_elem.innerText = elem['file-name'];
|
||||
par_elem.target = '_blank';
|
||||
}
|
||||
} else if (!['widget'].includes(elem.type))
|
||||
console.log(elem);
|
||||
if (par_elem)
|
||||
article_new.appendChild(par_elem);
|
||||
}
|
||||
}
|
||||
if (!article_new.hasChildNodes())
|
||||
article_new = '';
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
return article_new;
|
||||
}
|
||||
|
||||
function filterObject(obj, filterFn, mapFn = function (val, key) {
|
||||
return [key, val];
|
||||
}) {
|
||||
return Object.fromEntries(Object.entries(obj).
|
||||
filter(([key, val]) => filterFn(val, key)).map(([key, val]) => mapFn(val, key)));
|
||||
}
|
||||
|
||||
function matchKeyJson(key, keys) {
|
||||
let match = false;
|
||||
if (typeof keys === 'string')
|
||||
match = (key === keys);
|
||||
else if (Array.isArray(keys))
|
||||
match = keys.includes(key);
|
||||
else if (keys instanceof RegExp)
|
||||
match = keys.test(key);
|
||||
return match;
|
||||
}
|
||||
|
||||
function findKeyJson(json, keys, min_val_len = 0) {
|
||||
let source = '';
|
||||
if (Array.isArray(json)) {
|
||||
for (let elem of json)
|
||||
source = source || findKeyJson(elem, keys, min_val_len);
|
||||
} else if (typeof json === 'object') {
|
||||
for (let elem in json) {
|
||||
let json_elem = json[elem];
|
||||
if (typeof json_elem === 'string' && matchKeyJson(elem, keys)) {
|
||||
if (json_elem.length > min_val_len)
|
||||
return json_elem;
|
||||
} else if (Array.isArray(json_elem) && json_elem.length > 1 && matchKeyJson(elem, keys)) {
|
||||
return json_elem;
|
||||
} else
|
||||
source = source || findKeyJson(json_elem, keys, min_val_len);
|
||||
}
|
||||
}
|
||||
return source;
|
||||
}
|
||||
|
||||
function getNestedKeys(obj, key) {
|
||||
if (key in obj)
|
||||
return obj[key];
|
||||
let keys = key.split('.');
|
||||
let value = obj;
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
value = value[keys[i]];
|
||||
if (value === undefined)
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function getJsonUrlText(article, callback, article_id = '', key = '', url_rest = false, url_slash = false) {
|
||||
let json_url_dom = document.querySelector('head > link[rel="alternate"][type="application/json"][href]');
|
||||
let json_url;
|
||||
if (json_url_dom)
|
||||
json_url = json_url_dom.href;
|
||||
if (!json_url && article_id)
|
||||
json_url = window.location.origin + '/wp-json/wp/v2/posts/' + article_id;
|
||||
if (url_rest)
|
||||
json_url = json_url.replace('/wp-json/', '/?rest_route=/');
|
||||
else if (url_slash)
|
||||
json_url = json_url.replace('/wp-json/', '//wp-json/');
|
||||
if (json_url) {
|
||||
fetch(json_url)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.text().then(html => {
|
||||
try {
|
||||
let json = JSON.parse(html.replace(/<script>[\S\s]+<\/script>/g, ''));
|
||||
let json_text = parseHtmlEntities(!key ? json.content.rendered : getNestedKeys(json, key));
|
||||
if (json_text && json_text !== 'undefined')
|
||||
callback(json_text, article);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getJsonUrlAdd(json_text, article, art_options = {}) {
|
||||
let art_type = 'div';
|
||||
let art_attrib = '';
|
||||
if (Object.keys(art_options).length) {
|
||||
if (art_options.art_type)
|
||||
art_type = art_options.art_type;
|
||||
if (art_options.art_class)
|
||||
art_attrib += ' class="' + art_options.art_class + '"';
|
||||
if (art_options.art_id)
|
||||
art_attrib += ' id="' + art_options.art_id + '"';
|
||||
if (art_options.art_style)
|
||||
art_attrib += ' style="' + art_options.art_style + '"';
|
||||
if (art_options.func_text)
|
||||
json_text = art_options.func_text(json_text);
|
||||
}
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<' + art_type + art_attrib + '>' + json_text + '</' + art_type + '>', 'text/html');
|
||||
let article_new = doc.querySelector(art_type);
|
||||
if (art_options.art_append || !article.parentNode) {
|
||||
if (!art_options.art_hold)
|
||||
article.innerHTML = '';
|
||||
article.appendChild(article_new);
|
||||
} else
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
if (func_post)
|
||||
func_post();
|
||||
}
|
||||
|
||||
function getJsonUrl(paywall_sel, paywall_action = '', article_sel, art_options = {}, article_id = '', key = '', url_rest = false, url_slash = false) {
|
||||
let paywall = document.querySelectorAll(paywall_sel);
|
||||
let article = document.querySelector(article_sel);
|
||||
if (paywall.length && article) {
|
||||
clearPaywall(paywall, paywall_action);
|
||||
getJsonUrlText(article, (json_text, article) => {
|
||||
if (json_text && article)
|
||||
getJsonUrlAdd(json_text, article, art_options);
|
||||
}, article_id, key, url_rest, url_slash);
|
||||
}
|
||||
}
|
||||
|
||||
function randomInt(max) {
|
||||
return Math.floor(Math.random() * Math.floor(max));
|
||||
}
|
||||
|
||||
function randomIP(range_low = 0, range_high = 223) {
|
||||
let rndmIP = [];
|
||||
for (let n = 0; n < 4; n++) {
|
||||
if (n === 0)
|
||||
rndmIP.push(range_low + randomInt(range_high - range_low + 1));
|
||||
else
|
||||
rndmIP.push(randomInt(255) + 1);
|
||||
}
|
||||
return rndmIP.join('.');
|
||||
}
|
||||
|
||||
function pageContains(selector, text) {
|
||||
let elements = document.querySelectorAll(selector);
|
||||
return Array.prototype.filter.call(elements, function (element) {
|
||||
return RegExp(text).test(element.textContent);
|
||||
});
|
||||
}
|
||||
|
||||
function findOverlap(a, b) {
|
||||
if (b.length === 0)
|
||||
return "";
|
||||
if (a.endsWith(b))
|
||||
return b;
|
||||
return findOverlap(a, b.substring(0, b.length - 1));
|
||||
}
|
||||
|
||||
function breakText(str, headers = false) {
|
||||
str = str.replace(/(?:^|[A-Za-z\"\“\”\)])(\.+|\?|!)(?=[A-ZÖÜ\„\”\d][A-Za-zÀ-ÿ\„\d]{1,})/gm, "$&\n\n");
|
||||
if (headers)
|
||||
str = str.replace(/(([a-z]{2,}|[\"\“]))(?=[A-Z](?=[A-Za-zÀ-ÿ]+))/gm, "$&\n\n");
|
||||
return str;
|
||||
}
|
||||
|
||||
function parseHtmlEntities(encodedString) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<textarea>' + encodedString + '</textarea>', 'text/html');
|
||||
let dom = doc.querySelector('textarea');
|
||||
return dom.value;
|
||||
}
|
||||
|
||||
function encode_utf8(str) {
|
||||
return unescape(encodeURIComponent(str));
|
||||
}
|
||||
|
||||
function decode_utf8(str) {
|
||||
return decodeURIComponent(escape(str));
|
||||
}
|
||||
|
||||
function ads_hide() {
|
||||
var overlay = document.querySelector('body.didomi-popup-open');
|
||||
if (overlay)
|
||||
overlay.classList.remove('didomi-popup-open');
|
||||
var ads = 'div.OUTBRAIN, div[id^="taboola-" i], div.ad-container, div[class*="-ad-container"], div[class*="_ad-container"], div.arc_ad, div[id^="poool-"], amp-ad, amp-embed[type="mgid"], amp-embed[type="outbrain"], amp-embed[type="taboola"]';
|
||||
hideDOMStyle(ads, 10);
|
||||
}
|
||||
|
||||
function leaky_paywall_unhide() {
|
||||
if (document.querySelector('head > link[href*="/leaky-paywall"], script[src*="/leaky-paywall"], div[id^="issuem-leaky-paywall-"]')) {
|
||||
let js_cookie = document.querySelector('script#leaky_paywall_cookie_js-js-extra');
|
||||
if (js_cookie && js_cookie.text.includes('"post_container":"')) {
|
||||
let post_sel = js_cookie.text.split('"post_container":"')[1].split('"')[0];
|
||||
if (post_sel) {
|
||||
let post = document.querySelector(post_sel);
|
||||
if (post)
|
||||
post.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue