Raw Source
Bropezka / VirusTotal Linkify (Old and New VT)

// ==UserScript==
// @name         VirusTotal Linkify (Old and New VT)
// @namespace    https://www.virustotal.com/
// @version      1.0.0
// @description  Changes SHA-256 hash on VirusTotal result pages to VTi search links and always displays menu.
// @author       fwosar - edited by Bropezka to work with the old VT as well
// @match        https://*.virustotal.com/*
// @grant        none
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require      https://gist.github.com/raw/2625891/waitForKeyElements.js
// @updateURL    https://openuserjs.org/meta/fwosar/VirusTotal_Linkify.meta.js
// ==/UserScript==


function linkifyHash() {
    function getElementByXpath(path) {
        return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
    }
    function searchUrl(h) {
        return 'https://www.virustotal.com/intelligence/search/?query=' + h.trim();
    }

    var xpath = '//*[@id="basic-info"]//*/tbody/tr[1]/td[2]';
    var hashElement = getElementByXpath(xpath);

    if (hashElement) {
        var hash = hashElement.textContent;
        hashElement.innerHTML = '<a href="' + searchUrl(hash) + '">' + hash + '</a>';
    }
}


waitForKeyElements("#basic-info", linkifyHash);

//New version of Virustotal

function linkifyHash2() {
    function getElementByXpath(path) {
        return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
    }
    function searchUrl(h) {
        return 'https://www.virustotal.com/intelligence/search/?query=' + h.trim();
    }

    var xpath = '//*[@id="file-summary"]/tbody/tr[1]/td';
    var hashElement = getElementByXpath(xpath);

    if (hashElement) {
        var hash = hashElement.textContent;
        hashElement.innerHTML = '<a href="' + searchUrl(hash) + '">' + hash + '</a>';
    }
}

function adjustMenu() {
    if(!$('#itemActionsMenu').hasClass('opened')){
        $('#itemActionsMenu').addClass('opened');
    }
}

waitForKeyElements("#itemActionsMenu", adjustMenu);
waitForKeyElements("#file-summary", linkifyHash2);