Greasy Fork is available in English.

Shellshock.io Ad Blocker

Blocks ads on Shellshock.io

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
// ==UserScript==
// @name         Shellshock.io Ad Blocker
// @namespace    https://shellshock.io
// @description  Blocks ads on Shellshock.io
// @version      1.2.1
// @match        *://*.shellshock.io/*
// @match        *://*.shell.onlypuppy7.online/*
// @match        *://*.algebra.best/*
// @match        *://*.algebra.vip/*
// @match        *://*.biologyclass.club/*
// @match        *://*.deadlyegg.com/*
// @match        *://*.deathegg.world/*
// @match        *://*.eggboy.club/*
// @match        *://*.eggboy.xyz/*
// @match        *://*.eggcombat.com/*
// @match        *://*.egg.dance/*
// @match        *://*.eggfacts.fun/*
// @match        *://*.egghead.institute/*
// @match        *://*.eggisthenewblack.com/*
// @match        *://*.eggsarecool.com/*
// @match        *://*.geometry.best/*
// @match        *://*.geometry.monster/*
// @match        *://*.geometry.pw/*
// @match        *://*.geometry.report/*
// @match        *://*.hardboiled.life/*
// @match        *://*.hardshell.life/*
// @match        *://*.humanorganising.org/*
// @match        *://*.mathactivity.xyz/*
// @match        *://*.mathactivity.club/*
// @match        *://*.mathdrills.info/*
// @match        *://*.mathdrills.life/*
// @match        *://*.mathfun.rocks/*
// @match        *://*.mathgames.world/*
// @match        *://*.math.international/*
// @match        *://*.mathlete.fun/*
// @match        *://*.mathlete.pro/*
// @match        *://*.overeasy.club/*
// @match        *://*.risenegg.com/*
// @match        *://*.scrambled.tech/*
// @match        *://*.scrambled.today/*
// @match        *://*.scrambled.us/*
// @match        *://*.scrambled.world/*
// @match        *://*.shellshockers.club/*
// @match        *://*.shellshockers.life/*
// @match        *://*.shellshockers.site/*
// @match        *://*.shellshockers.us/*
// @match        *://*.shellshockers.world/*
// @match        *://*.shellshockers.xyz/*
// @match        *://*.shellsocks.com/*
// @match        *://*.softboiled.club/*
// @match        *://*.urbanegger.com/*
// @match        *://*.violentegg.club/*
// @match        *://*.violentegg.fun/*
// @match        *://*.yolk.best/*
// @match        *://*.yolk.life/*
// @match        *://*.yolk.rocks/*
// @match        *://*.yolk.tech/*
// @match        *://*.yolk.quest/*
// @match        *://*.yolk.today/*
// @match        *://*.zygote.cafe/*
// @match        *://*.shellshockers.best/*
// @match        *://*.eggboy.me/*
// @license MIT
// ==/UserScript==

(function() {
  'use strict';

  // Function to remove the ad blocker warning element
  function removeAdBlockerWarning() {
    var adBlockerWarning = document.getElementById('adBlockerVideo');
    if (adBlockerWarning) {
      adBlockerWarning.parentNode.removeChild(adBlockerWarning);
    }
  }

  // Function to prevent ads from being loaded
  function blockAds() {
    var aiptag = window.aiptag;
    if (aiptag) {
      aiptag.cmd = [];
      aiptag.cmd.display = [];
      aiptag.cmd.player = [];
    }
  }

  // Observe the document for changes to detect when the ad blocker warning element is created
  var observer = new MutationObserver(function(mutations) {
    mutations.forEach(function(mutation) {
      if (mutation.addedNodes && mutation.addedNodes.length > 0) {
        for (var i = 0; i < mutation.addedNodes.length; i++) {
          var node = mutation.addedNodes[i];
          if (node.id === 'adBlockerVideo') {
            removeAdBlockerWarning();
          }
        }
      }
    });
  });

  // Configure the observer to observe the document for changes
  observer.observe(document, {
    childList: true,
    subtree: true
  });

  // Block ads immediately
  blockAds();

  // Block ads whenever the aiptag object is updated
  setInterval(blockAds, 1000);
})();