Trying to implement ze.tt gr.een bypass

This commit is contained in:
tobimori 2020-03-16 21:27:17 +01:00
parent 0bb5a2c0e6
commit 132b6d74c7
3 changed files with 32 additions and 0 deletions

View File

@ -46,3 +46,4 @@ chrome.webRequest.onBeforeRequest.addListener(
["blocking"]
);
// block ze.tt steady

25
components/zettgreen.js Normal file
View File

@ -0,0 +1,25 @@
// ____
// __ _____ ___ ___ ___ ___ _____ _/ / /
// / // / _ \/ _ \/ _ `/ // / |/|/ / _ `/ / /
// \_,_/_//_/ .__/\_,_/\_, /|__,__/\_,_/_/_/
// /_/ /___/
//
// ze.tt green component
// github.com/tobimori/unpaywall
//
// notes:
// function ph.callIfNoPaywall is defined in header.js which also includes
// serveral other functions to keep the site working, blocking scripts is no option to keep site working
// or at least header working
//
const d = document;
const observer = new MutationObserver(function (mutations, me) {
[...d.getElementsByTagName("script")].map(n => !n.getAttribute("src") && n.remove());
});
observer.observe(d, {
childList: true,
subtree: true
});

View File

@ -110,6 +110,12 @@
],
"js": ["lib.js", "components/lensingmedia.js"],
"run_at": "document_end"
}, {
"matches": [
"*://*.ze.tt/*"
],
"js": ["lib.js", "components/zettgreen.js"],
"run_at": "document_start"
}
]