Incognito Bing open links in the same tab by default

When incognito, Bing opens links in the same tab by default.

Versione datata 28/10/2021. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Incognito Bing open links in the same tab by default
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  When incognito, Bing opens links in the same tab by default.
// @author       Samis
// @match        https://www.bing.com/*
// @icon         https://www.google.com/s2/favicons?domain=bing.com
// @grant        none
// @noframes
// ==/UserScript==

(function() {
    'use strict';

    if(GM_info.isIncognito && !sessionStorage.getItem("ranOnce"))
       changeCookies();

})();
function changeCookies() {
    let cookieValue = "&EXLKNT=0";
    document.cookie = "SRCHHPGUSR=" + cookieValue;
    window.location.reload("true");

    sessionStorage.setItem("ranOnce", "true");
}