aboutsummaryrefslogblamecommitdiffstats
path: root/Nettavisen noblink/Nettavisen noblink.user.js
blob: 02e0c12f5795dd4d8eb0c13ee81b314d1786d237 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                            






                                                                                         
// ==UserScript==
// @name        Nettavisen noblink
// @namespace   snake66
// @description Remove annoying blinking backgrounds and animated marquees at nettavisen.no.
// @include     https://*.nettavisen.no/*
// @version     1
// @grant       none
// ==/UserScript==

let nettavisen_blink_classes = [
  'optimus-element-sonar',
]

function nettavisen_noblink()
{
  for (let cls of nettavisen_blink_classes) {
    for (let blinker of document.getElementsByClassName(cls)) {
      blinker.remove()
    }
  }
}

let nettavisen_obsrvr = new MutationObserver(nettavisen_noblink)
nettavisen_obsrvr.observe(document, { attributes: true, childList: true, subtree: true })