Remove doubleclick tracking

Use original links instead of "ad.doubleclick.net" links in the Google Search means a little less tracking!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name Remove doubleclick tracking
// @description Use original links instead of "ad.doubleclick.net" links in the Google Search means a little less tracking!
// @namespace Violentmonkey Scripts
// @match https://www.google.com/search
// @grant none
// @version 0.0.1.20190521130657
// ==/UserScript==

  var oldOnload = window.onload;

  window.onload = function () {

      if (typeof oldOnload == 'function') {
        oldOnload();
      }

      var adClickElements = document.getElementsByClassName('pla-unit-container');
      var text = '';
      var i;
    
      text += 'Items to fix: ';
      text += adClickElements.length - 1;
      text += '\n'
    
      for (i = 0; i < adClickElements.length - 1; i++) {
        text += 'URL \'' + adClickElements[i].removeChild(adClickElements[i].childNodes[0]) + '\' removed. \n';
      }
    
      text += 'Done, enjoy Google Search with a little less tracking! :-)';

      console.log(text);
  }