From 4ca617f717c0aa65f49caa308afc312d25fd8908 Mon Sep 17 00:00:00 2001 From: tobimori Date: Sun, 15 Mar 2020 14:50:38 +0100 Subject: [PATCH] Background tinypass blocker work --- components/funke.js | 21 --------------------- components/lensingmedia.js | 1 + lib.js | 5 +++-- 3 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 components/funke.js diff --git a/components/funke.js b/components/funke.js deleted file mode 100644 index 6f47716..0000000 --- a/components/funke.js +++ /dev/null @@ -1,21 +0,0 @@ -// ____ -// __ _____ ___ ___ ___ ___ _____ _/ / / -// / // / _ \/ _ \/ _ `/ // / |/|/ / _ `/ / / -// \_,_/_//_/ .__/\_,_/\_, /|__,__/\_,_/_/_/ -// /_/ /___/ -// -// lensing media component -// github.com/tobimori/unpaywall -// -// notes: -// blocking of funke script done in background.js -// - -const d = document; - -if (d.getElementsByClassName('article__header__headline ispayedcontent')) { - removeElements( - d.getElementsByClassName("paging__wrapper"), - d.getElementsByClassName("pager pager__bottom") - ); -}; \ No newline at end of file diff --git a/components/lensingmedia.js b/components/lensingmedia.js index 5d253e8..3ff3376 100644 --- a/components/lensingmedia.js +++ b/components/lensingmedia.js @@ -11,4 +11,5 @@ // blocking of tinypass script done in background.js // +// removes blur from content document.getElementById("BaseText").classList.contains("PianoContent") && document.getElementById("BaseText").classList.remove("PianoContent"); \ No newline at end of file diff --git a/lib.js b/lib.js index f27ff00..1431eed 100644 --- a/lib.js +++ b/lib.js @@ -18,6 +18,7 @@ const removeElements = (...arrays) => { const listenerPaywalls = [ "abendblatt", - + "waz", + "ikz-online" ] -const isListenerPaywalled = (details) => { if(listenerPaywalls.contains(details.originUrl.split("/", 3)[2].split(".",2)[1])) return true;}; \ No newline at end of file +const isPaywalled = (details) => { if(listenerPaywalls.includes(details.originUrl.split(".",2)[1])) return true;}; \ No newline at end of file