11

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":

enter image description here

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?

5 Answers5

5

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

DavidPostill
  • 162,382
2

Currently adding:

startpage.com##.clicktrackedAd_js to my uBlock Orgin filter list did the job. No ad search results where showing up anymore.

Giacomo1968
  • 58,727
1

Following @DavidPostill's notice, I looked again at the page structure. It appears that the text ads are moved outside the div.spon_links when Adblock Edge is enabled which indeed has a filtering rule for spon_links. Whether this is a misbehaviour of Adblock Edge or some counter-action from Startpage I don't know.

There is a simpler solution than adding a custom Greasemonkey script—simply swapping Adblock Edge for uBlock also solved the problem.


On further investigation, the ads only disappear with uBlock enabled when Adblock Edge is entirely disabled at the same time ("Disable everywhere"). Even if I disable it only for Startpage ("Disable on startpage.com"), the site moves the ads outside the spon_links container. My explanation is that Startpage somehow manages to access my Add-ons preferences and checks if Adblock is generally enabled. Could it be that nasty?!


Using David's approach of Greasemonkey and removeChild, I came up with the following solution that still works when Adblock Edge is installed. It seems one has to wait till the page has loaded and toyed around with avoiding ad-block, until you can finally locate and delete the offending elements:

// ==UserScript==
// @name        startpage/ixquick remove ads
// @namespace   startpage.com
// @description Removes ads from startpage/ixquick before they are displayed.
// @include     https://startpage.com/*
// @include     https://*.startpage.com/*
// @include     https://ixquick.com/*
// @include     https://*.ixquick.com/*
// @run-at      document-end
// @grant       none
// @version     2015-09-29
// ==/UserScript==

var fun = function() {
  var results = document.getElementById('bottom-result-container');
  if (results) {
    var ols = results.getElementsByTagName('ol');
    for (i = 0; i < ols.length; i++) {
      var ol = ols[i];
      var ps = ol.getElementsByTagName('p');
      for (j = 0; j < ps.length; j++) {
        var p = ps[j];
        if (p.className == 'head2') {
          var spans = p.getElementsByTagName('span');
          for (k = 0; k < spans.length; k++) {
            if (spans[k].innerHTML.contains("Ads related to")) {
              ol.innerHTML = '';
            }
          }
        }
      }
    }
  }
};
setTimeout(fun, 1);

(Sorry, my JavaScript is a bit rusty, probably easier with jQuery.)

0

Change your ad blocking extension to uBlock Origin. The page appears normally and without ads in uBlock Origin with either Firefox 41.0 or Chrome 44.0.2403.155 m.

screenshot of startpage.com search results page in Firefox 41 with uBlock Origin

Enable the filters from 'Fanboy+Easylist-Merged Ultimate List‎' (already contains EasyList, EasyPrivacy, Fanboy's Enhanced Tracking, Annoyance and Social Blocking Lists‎ - so there's no need to also enable those filter lists too).

0

In AdblockPro I was able to block the div by adding this rule:

startpage.com###sponsored_csa1

I used the ABP Element Hiding Helper to select the parent div for me and accepted its default rule.

AdBlock Edge is a fork of ABP, so I'd expect a rule there to work in ABE as well. However ABE has been discontinued by it's developer, so you really should either go back to ABP (and just turn off the acceptable ads feature) or switch to uBlock.

uBlock might be the better choice from a technical standpoint as well; it's supposed to have a lighter memory/cpu load in FF than ABP. It also fully works works with the upcoming electrolysis update for Firefox which splits the top level UI and tabs into separate processes and runs the latter at more heavily restricted settings which should make it harder to exploit by malware authors (IE and Chrome have done this for years). It's eta is potentially as early as the end of the year. (FF43/Dec 14 has been their target date for a while; If they make it depends on how well telemetry in the alpha/beta builds look and how small the number of open bugs is.)