Skip to content

Instantly share code, notes, and snippets.

@simonwep
Last active January 15, 2020 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonwep/2e916cf2409ab9e7a2d31e886c35abcc to your computer and use it in GitHub Desktop.
Save simonwep/2e916cf2409ab9e7a2d31e886c35abcc to your computer and use it in GitHub Desktop.
Hides duckduckgo ads
// ==UserScript==
// @name DuckDuckNoAds
// @version 1.0
// @namespace http://tampermonkey.net/
// @description Hides duckduckgo ads
// @match https://duckduckgo.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
!async function () {
const hideAdsStyle = document.createElement('style');
hideAdsStyle.innerHTML = '[class*=ads]:not(html){display: none !important;}';
document.body.insertAdjacentElement('beforeend', hideAdsStyle);
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment