NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name nhl.tv disable game center // @namespace https://openuserjs.org/meta/nharward/nhl.tv // @version 0.1 // @description Hides the buggy and often score-spoiling game center widget // @author Nathaniel Harward // @match https://www.nhl.com/tv/* // @grant none // @license MIT // @copyright 2020, nharward (https://openuserjs.org/users/nharward) // ==/UserScript== // ==OpenUserJS== // @author nharward // ==/OpenUserJS== function handleNode(node) { if (node.id === "gamecenter-widget") { node.style.visibility = "collapse"; console.log("Disabled game center widget"); } } function mutationCallback(mutationsList, observer) { mutationsList.forEach((mutationRecord) => { if (mutationRecord.addedNodes) { mutationRecord.addedNodes.forEach(handleNode); } }); } (function () { 'use strict'; new MutationObserver(mutationCallback).observe(document.body, { childList: true, subtree: true }); })();