From 8c40766f401a5f82579eea7a784100e5d6b59a9f Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 25 Mar 2021 19:14:47 +0100 Subject: 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. --- Dagbladet noblink/Dagbladet noblink.user.js | 26 +++++++++++++++++++------- 1 file 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== -- cgit v1.2.3