PurSiC

Remove GoogleAds Script

Feb 29th, 2020
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Remove Google Ads
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       Pu12
  7. // @include      http://*
  8. // @include      https://*
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.     'use strict';
  14.  
  15.     var bannerads = document.getElementsByClassName('US_F_ADS');
  16.     if(bannerads[0]){
  17.         bannerads[0].remove();
  18.     }
  19.     [...document.querySelectorAll('.adsbygoogle')].forEach(function(eleads) {
  20.         if(eleads){
  21.             eleads.remove();
  22.         }
  23.     });
  24.  
  25. })();
Add Comment
Please, Sign In to add comment