// ==UserScript== // @name FGD // @version 0.5 // @description True URLs displayed and highlighted on Google // @author Cristo // @include *://www.google.*/* // @copyright 2012+, You // @namespace https://greasyfork.org/users/1973 // @downloadURL none // ==/UserScript== //Still testing for bugs window.addEventListener("DOMNodeInserted", check, false); function check(e) { if (e.target.getAttribute("data-async-context")){ loaded(); }} function loaded(){ var page = document.getElementById("ires"); var linkPac = page.getElementsByClassName("rc"); for (var g = 0; g < linkPac.length; g++){ var aTag = linkPac[g].getElementsByClassName("r")[0].firstChild; var but = document.createElement("p"); but.setAttribute("class","rangy"); but.innerHTML = aTag.href; linkPac[g].parentNode.insertBefore(but, linkPac[g].nextSibling); } var siteP = document.getElementsByClassName("rangy"); for (var p = 0; p < siteP.length; p++){ siteP[p].addEventListener("mouseover", overit, false); } function overit(){ var selection = window.getSelection(); var range = document.createRange(); range.selectNodeContents(this); selection.removeAllRanges(); selection.addRange(range); } } document.onload = loaded();