Created
August 3, 2022 20:55
-
-
Save khaslu/148820fdf10968017d2a4b5c0cbfe8c1 to your computer and use it in GitHub Desktop.
Remove Google AD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove Google AD | |
// @namespace http://tampermonkey.net/ | |
// @Version 0.1 | |
// @description Remove Google AD | |
// @author Lucas Mota Vieira | |
// @match https://www.google.com/* | |
// @ICON https://www.google.com/s2/favicons?sz=64&domain=google.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function ready(callback){ | |
// in case the document is already rendered | |
if (document.readyState!='loading') callback(); | |
// modern browsers | |
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback); | |
// IE <= 8 | |
else document.attachEvent('onreadystatechange', function(){ | |
if (document.readyState=='complete') callback(); | |
}); | |
} | |
ready(function(){ | |
document.querySelectorAll('#tads').forEach(function(e) { | |
e.remove(); | |
}) | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment