// ==UserScript== // @name Stake Blur Script // @namespace http://tampermonkey.net/ // @version 1.3 // @description Blur specific elements on stake.com, stake.bet, and stake.ac while preserving "Stake" text. // @author // @match *://stake.com/* // @match *://stake.bet/* // @match *://stake.ac/* // @grant none // @run-at document-end // @license MIT // @downloadURL none // ==/UserScript== (function() { "use strict"; const mainBlurValue = "5px"; // Blur for SVGs and images const extraBlurValue = "4px"; // Blur for .back.svelte-mru6at.face-down elements function blurElements(node) { // Blur SVGs with class svelte-md2ju7, except the one with viewBox "0 0 396.11 197.92" node.querySelectorAll("svg.svelte-md2ju7").forEach(el => { if (el.getAttribute("viewBox") !== "0 0 396.11 197.92") { el.style.filter = `blur(${mainBlurValue})`; } }); // Blur SVGs with specified width and height attributes node.querySelectorAll('svg[width="885"][height="465"]').forEach(el => { el.style.filter = `blur(${mainBlurValue})`; }); // Blur images with alt "Stake Logo" (case sensitive) node.querySelectorAll('img[alt="Stake Logo"]').forEach(el => { el.style.filter = `blur(${mainBlurValue})`; }); // Blur images with alt "stake logo" (lowercase) node.querySelectorAll('img[alt="stake logo"]').forEach(el => { el.style.filter = `blur(${mainBlurValue})`; }); // Blur images with alt "Sports" node.querySelectorAll('img[alt="Sports"]').forEach(el => { el.style.filter = `blur(${mainBlurValue})`; }); } function blurExtraElements(node) { node.querySelectorAll(".back.svelte-mru6at.face-down").forEach(el => { el.style.filter = `blur(${extraBlurValue})`; }); } function processNode(node) { if (node.nodeType === Node.ELEMENT_NODE) { blurElements(node); blurExtraElements(node); } } processNode(document); const observer = new MutationObserver(mutations => { mutations.forEach(mutation => { mutation.addedNodes.forEach(node => { processNode(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); setInterval(() => { processNode(document); }, 1000); })();