Bing Image Direct Link Patch

Make CTRL+Click on image thumbnail go directly to the image in a Bing Image search result. Use CTRL+SHIFT+Click to open image in a new tab.

Versione datata 01/09/2017. Vedi la nuova versione l'ultima versione.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo 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        Bing Image Direct Link Patch
// @namespace   BingImageDirectLinkPatch
// @description Make CTRL+Click on image thumbnail go directly to the image in a Bing Image search result. Use CTRL+SHIFT+Click to open image in a new tab.
// @author      jcunews
// @include     https://www.bing.com/images/search*
// @version     1.0.1
// @grant       none
// ==/UserScript==

//add direct image URL to the image bottom panel
document.addEventListener("click", function(ev) {
  var base, ele = ev.target, url, link, z;
  if (!ev.button && ev.ctrlKey && ele.classList.contains("mimg")) try {
    base = ele.parentNode.parentNode.parentNode.parentNode;
    url = JSON.parse(base.querySelector(".iusc").getAttribute("m")).murl;
    if (ev.shiftKey) {
      open(url, "bidlp" + (new Date()).valueOf());
    } else {
      location.href = url;
    }
    ev.preventDefault();
    ev.stopPropagation();
    ev.stopImmediatePropagation();
  } catch (z) {}
}, true);