Google Search remove icons and undo breadcrumbs

fuck breadcrumbs and icons in Google search result.

目前为 2019-11-03 提交的版本。查看 最新版本

// ==UserScript==
// @name         Google Search remove icons and undo breadcrumbs
// @version      0.0.2
// @description  fuck breadcrumbs and icons in Google search result.
// @author       Starduster
// @match        https://*.google.com/search?*
// @include     /^https?://(?:www|encrypted|ipv[46])\.google\.[^/]+/(?:$|[#?]|search|webhp)/
// @grant        none
// @namespace https://gf.qytechs.cn/users/355044
// ==/UserScript==

var load,execute,loadAndExecute;load=function(a,b,c){var d;d=document.createElement("script"),d.setAttribute("src",a),b!=null&&d.addEventListener("load",b),c!=null&&d.addEventListener("error",c),document.body.appendChild(d);return d},execute=function(a){var b,c;typeof a=="function"?b="("+a+")();":b=a,c=document.createElement("script"),c.textContent=b,document.body.appendChild(c);return c},loadAndExecute=function(a,b){return load(a,function(){return execute(b)})};

loadAndExecute("//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js", function() {
    $("#answer-6834930").css("border", ".5em solid black");
});

var results = document.querySelectorAll(".r");

if (results) {
	for (i=0; i < results.length; i++) {
		try {
			var link = results[i].querySelector(".r img").getAttribute("alt");			
			var path = results[0].querySelector(".r cite").innerHTML.split("›")
			path[0] = link.slice(0,-1) + " " 
			for (j=0; j < 2; j++) {
				results[i].querySelectorAll(".r cite")[j].innerHTML = path.join("›")
			}
			results[i].querySelector(".r img").remove()
			results[i].querySelector(".r img").remove()
		}

		catch(e){
			console.log("Google Search restore URLs - ERROR @: " + i + ": " + e.message);
			continue;
		}
	}
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址