Block Twitch Ads

try to take over the world

目前为 2023-02-13 提交的版本。查看 最新版本

(function() {
    'use strict';

    // Your code here...
})();// ==UserScript==
// @name        Block Twitch Ads
// @namespace   http://www.example.com/
// @match     https://www.twitch.tv/*
// @version     1
// @license MIT
// @description  try to take over the world
// @grant       none
// ==/UserScript==

const observer = new MutationObserver((mutations) => {
  mutations.forEach((mutation) => {
    mutation.addedNodes.forEach((node) => {
      if (node.nodeName === "DIV") {
        if (node.className && node.className.includes("ad-slot")) {
          node.remove();
        }
      }
    });
  });
});

observer.observe(document.body, { childList: true, subtree: true });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址