Last active
September 11, 2021 04:32
-
-
Save guidocella/e1b71e251a5fa867bdb0b5fdffa7f01b to your computer and use it in GitHub Desktop.
Greasemonkey Pixiv link filter remover
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Pixiv link filter remover | |
// @namespace https://github.com/guidocella | |
// @description Disable the link filter on Pixiv links. | |
// @match https://www.pixiv.net/* | |
// @version 1.0 | |
// @author Guido Cella | |
// ==/UserScript== | |
new MutationObserver(function (mutationsList) { | |
mutationsList.forEach(function (mutation) { | |
mutation.addedNodes.forEach(function (addedNode) { | |
addedNode.querySelectorAll('a[href^="/jump.php?"]') | |
.forEach(a => a.href = decodeURIComponent(a.href.substring(31))) | |
}) | |
}) | |
}).observe(document.body, { subtree: true, childList: true }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment