How do I block ads on startpage.com?
Any idea how to solve this?
The ads in question are in a div with ID "spon_links".
<div id="spon_links">
You can use a Greasemonkey script to remove these divs.
Solution 1
This is confirmed as working in Firefox when using the uBlock Origin ad blocker.
// ==UserScript==
// @name startpage.com remove ads
// @namespace startpage.com
// @description Removes ads from startpage.com before they are displayed.
// @include https://startpage.com/*
// @include https://*.startpage.com/*
// @run-at document-start
// @version 2015-09-29
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle("div#spon_links { display: none !important}");
Solution 2
Not tested.
Replace 'ads'
with 'spon_links'
in the example script below.
4.9. Removing an element
You can use Greasemonkey to remove entire chunks of a page in one fell swoop, with the removeChild function.
Example: Remove an ad sidebar
This presumes that there is an element whose ID is "ads".
var adSidebar = document.getElementById('ads'); if (adSidebar) { adSidebar.parentNode.removeChild(adSidebar); }
Removing an element with
removeChild
will also remove all the content inside it. For example, if you remove a<table>
element, this will also remove all of its table cells (<td>
elements).
Source 4.9. Removing an element
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
I tried the following, it has no effect:
startpage.com##[style*="background-color:#F5F9FF;"]
Any idea how to solve this?
To reproduce: Go to https://startpage.com/do/search - search for example for
adblock
. You'll see nasty light blue boxes at the top and bottom of the page reading "Ads related to adblock":This is with Iceweasel (Firefox 38.2.1) and Adblock Edge 2.1.9.1.
If it's not possible, which secure/privacy-respecting and ad-free sites do you recommend as alternative to IxQuick and Startpage?
-
Admin over 8 yearsThanks. Apparently it's either a bug in Adblock Edge or some counter action taken by the site. Because I just noticed that the ads are outside the
div.spon_links
when Adblock Edge is enabled. It does have a filter rule forspon_links
. Perhaps there is some JS that moves theol
elements somewhere else when thespon_links
is filtered.