Gartic.io Ad Blocker

Blocks ads on Gartic.io

  1. // ==UserScript==
  2. // @name Gartic.io Ad Blocker
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Blocks ads on Gartic.io
  6. // @author Your Name
  7. // @match *://gartic.io/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Reklamları gizlemek için stil ekle
  15. const css = `
  16. /* Reklam alanlarını gizle */
  17. .ad, .banner, #ads, .ad-container, .ad-banner {
  18. display: none !important;
  19. }
  20. `;
  21.  
  22. const style = document.createElement('style');
  23. style.appendChild(document.createTextNode(css));
  24. document.head.appendChild(style);
  25.  
  26. // Reklamları dinamik olarak kaldır
  27. const observer = new MutationObserver(() => {
  28. document.querySelectorAll('.ad, .banner, #ads, .ad-container, .ad-banner').forEach(ad => ad.style.display = 'none');
  29. });
  30.  
  31. observer.observe(document.body, { childList: true, subtree: true });
  32. })();