Greasy Fork

Greasy Fork is available in English.

Stake Blur Script

Blur specific elements on stake.com, stake.bet, and stake.ac.

当前为 2025-04-15 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Stake Blur Script
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Blur specific elements on stake.com, stake.bet, and stake.ac.
// @author       Dave
// @match        *://stake.com/*
// @match        *://stake.bet/*
// @match        *://stake.ac/*
// @grant        none
// @run-at       document-end
// @license      MIT
// ==/UserScript==

(function() {
  const blurValue = '5px';
  function blurElements(node) {
    node.querySelectorAll('svg.svelte-md2ju7').forEach(el => {
      if (el.getAttribute('viewBox') !== '0 0 396.11 197.92') {
        el.style.filter = `blur(${blurValue})`;
      }
    });
    node.querySelectorAll('svg[width="885"][height="465"]').forEach(el => {
      el.style.filter = `blur(${blurValue})`;
    });
    node.querySelectorAll('img[alt="Stake Logo"]').forEach(el => {
      el.style.filter = `blur(${blurValue})`;
    });
    node.querySelectorAll('img[alt="Sports"]').forEach(el => {
      el.style.filter = `blur(${blurValue})`;
    });
  }
  function processNode(node) {
    if (node.nodeType === Node.ELEMENT_NODE) {
      blurElements(node);
    }
  }
  blurElements(document);
  const observer = new MutationObserver(mutations => {
    mutations.forEach(mutation => {
      mutation.addedNodes.forEach(addedNode => {
        processNode(addedNode);
      });
    });
  });
  observer.observe(document.body, { childList: true, subtree: true });
})();
(function() {
  const selector = '.back.svelte-mru6at.face-down';
  const blurValue = '4px';
  function applyBlurToElement(el) {
    el.style.filter = `blur(${blurValue})`;
  }
  function applyBlurToAll() {
    const elements = document.querySelectorAll(selector);
    elements.forEach(applyBlurToElement);
  }
  applyBlurToAll();
  const observer = new MutationObserver(mutations => {
    mutations.forEach(mutation => {
      if (mutation.type === 'childList' || mutation.type === 'attributes') {
        applyBlurToAll();
      }
    });
  });
  observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style'] });
  setInterval(applyBlurToAll, 1000);
})();