Brings back the full URLs in results.
当前为
// ==UserScript==
// @name Google Search restore URLs (undo breadcrumbs)
// @namespace https://greasyfork.org/en/users/27283-mutationobserver
// @version 2019.09.04v1
// @description Brings back the full URLs in results.
// @author MutationObserver
// @match https://*.google.com/search?*
// @grant none
// ==/UserScript==
var results = document.querySelectorAll(".r");
if (results) {
for (i=0; i < results.length; i++) {
try {
var link = results[i].querySelector(".r a").getAttribute("href");
results[i].querySelector(".r cite").innerHTML = link;
}
catch(e){
continue;
}
}
document.querySelector("body").insertAdjacentHTML("afterbegin", `
<style id="breadcrumb-removal-userscript">
.r cite {
white-space: nowrap;
text-overflow: ellipsis;
}
.r > span {
position: absolute;
right: 0;
top: 5px;
}
</style>
`);
}