diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-03-25 19:14:47 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-03-25 19:16:39 +0100 |
commit | 8c40766f401a5f82579eea7a784100e5d6b59a9f (patch) | |
tree | a3b65218b0f10dc9c21113f21573d3ec1f89df9a | |
parent | 37d9a5fcb85778c19eb33f5e37a66f74de4fd71a (diff) | |
download | userscripts-8c40766f401a5f82579eea7a784100e5d6b59a9f.tar.gz userscripts-8c40766f401a5f82579eea7a784100e5d6b59a9f.tar.bz2 userscripts-8c40766f401a5f82579eea7a784100e5d6b59a9f.zip |
Update dagbladet noblink script
Adds a few more blinkers, and not detects updates to the DOM, so it
should be better at stopping blinking even further down the page.
-rw-r--r-- | Dagbladet noblink/Dagbladet noblink.user.js | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/Dagbladet noblink/Dagbladet noblink.user.js b/Dagbladet noblink/Dagbladet noblink.user.js index 233a035..5db55dd 100644 --- a/Dagbladet noblink/Dagbladet noblink.user.js +++ b/Dagbladet noblink/Dagbladet noblink.user.js @@ -4,15 +4,27 @@ // @description Remove annoying blinking backgrounds and animated marquees at dagbladet.no. // @include https://*.dagbladet.no/* // @include https://*.dinside.no/* -// @version 1 +// @version 2 // @grant none // ==/UserScript== -let blink_classes = ['breaking--just-now', 'breaking--pulse-background', 'breaking--pulse-kicker'] +let blink_classes = [ + 'breaking--just-now', + 'breaking--just-now-wave', + 'breaking--pulse-background', + 'breaking--pulse-kicker', + 'breaking--pulsating-dots' +] -for (let cls of blink_classes) { - for (let blinker of document.getElementsByClassName(cls)) { - //console.log("Disabling marquee on " + blinker.nodeName + " - " + blinker.nodeId) - blinker.classList.remove(cls) +function dagbladet_noblink() +{ + for (let cls of blink_classes) { + for (let blinker of document.getElementsByClassName(cls)) { + //console.log("Disabling marquee on " + blinker.nodeName + " - " + blinker.nodeId) + blinker.classList.remove(cls) + } } -}
\ No newline at end of file +} + +let dagbladet_obsrvr = new MutationObserver(dagbladet_noblink) +dagbladet_obsrvr.observe(document, { attributes: true, childList: true, subtree: true })// ==UserScript== |