aboutsummaryrefslogtreecommitdiffstats
path: root/Dagbladet noblink
diff options
context:
space:
mode:
Diffstat (limited to 'Dagbladet noblink')
-rw-r--r--Dagbladet noblink/Dagbladet noblink.user.js26
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==