Disable Bing Search Result User Data Tracking

Disable Bing Search result's user data tracking where trivial page interactions are recorded (e.g. page scrolling, mouse hover, etc.). It also disables link tracking that let Bing knows which off-site link the user is clicking. And additionally, this script ensures that the referring URL (i.e. the search page) is not sent to the target site.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Disable Bing Search Result User Data Tracking
// @namespace    https://greasyfork.org/en/users/85671-jcunews
// @version      1.0.1
// @license      AGPLv3
// @description  Disable Bing Search result's user data tracking where trivial page interactions are recorded (e.g. page scrolling, mouse hover, etc.). It also disables link tracking that let Bing knows which off-site link the user is clicking. And additionally, this script ensures that the referring URL (i.e. the search page) is not sent to the target site.
// @author       jcunews
// @match        *://www.bing.com/*
// @grant        none
// ==/UserScript==

((xo, xs) => {
  xo = XMLHttpRequest.prototype.open;
  XMLHttpRequest.prototype.open = function(mtd, url) {
    this.dbsrudtUrl = url;
    return xo.apply(this, arguments);
  };
  xs = XMLHttpRequest.prototype.send;
  XMLHttpRequest.prototype.send = function() {
    if ((/fd\/ls\/lsp\.aspx/).test(this.dbsrudtUrl)) return;
    return xs.apply(this, arguments);
  };
  document.querySelectorAll('a[h]').forEach(a => {
    a.removeAttribute("h");
    a.rel += (a.rel && " ") + "noreferrer";
  });
})();