"Supercharge Your Ad Blocking: How to Use Tampermonkey with AdBlock"
Visit Greasy Fork and search for:
// ==UserScript== // @name AdBlock Script // @namespace http://tampermonkey.net/ // @version 0.1 // @description Blocks some common ad types // @author You // @match *://*/* // @grant none // ==/UserScript== tampermonkey adblock
Here’s a concise write-up on using to block ads, including how it compares to dedicated adblockers, a sample script, and key limitations.
// ==UserScript== // @name Simple Ad Remover // @namespace http://tampermonkey.net/ // @version 1.0 // @description Remove common ad elements // @author You // @match *://*/* // @grant none // ==/UserScript== "Supercharge Your Ad Blocking: How to Use Tampermonkey
Many sites now use scripts to detect if you have an extension like Adblock Plus enabled. A Tampermonkey script can often disable these detection scripts, allowing you to access the site without being "locked out".
Beyond the Extension: The Power of Tampermonkey for Ad Blocking Beyond the Extension: The Power of Tampermonkey for
// This injects CSS to hide elements commonly used for ads GM_addStyle(` /* Hide elements by common ad IDs and Classes */ [id*="google_ads"], [id*="banner-ad"], [class*="ad-"], [class*="ads-"], [class*="advertising"], iframe[src*="ads"], iframe[src*="doubleclick"], .ad-container, .banner-ad, #carbonads, #ads