Update Tumblr Unnagger to 1.0.2

- Fix hiding sign up and follow buttons
This commit is contained in:
blankie 2024-01-27 15:37:43 +11:00
parent 57875d4733
commit 4f32e63ece
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 26 additions and 27 deletions

View File

@ -2,9 +2,8 @@
// @name Tumblr Unnagger
// @namespace blankie-scripts
// @match https://*.tumblr.com/*
// @exclude-match https://www.tumblr.com/*
// @grant GM_addStyle
// @version 1.0.1
// @version 1.0.2
// @author blankie
// @description Removes login nags
// @inject-into content
@ -49,10 +48,9 @@ if (/^\/archive(\/.*)?$/.test(window.location.pathname)) {
`;
}
if (window.location.hostname !== "www.tumblr.com" || window.location.pathname === "/dashboard/iframe") {
GM_addStyle(css);
function removeLoginWall(element) {
element.removeAttribute("data-login-wall-type");
for (let child of element.querySelectorAll("[data-login-wall-type]")) {
@ -78,3 +76,4 @@ let observer = new MutationObserver(function(mutations) {
}
});
observer.observe(document.body, {childList: true, subtree: true});
}