Google Search Display URL

Display page URLs under the page names (legacy feature).

目前为 2020-07-06 提交的版本。查看 最新版本

/* ==UserStyle==
@name           Google Search Display URL
@name:ja        Google検索 URLを表示
@description    Display page URLs under the page names (legacy feature).
@description:ja 以前のようにページ名の下へURLを表示します。
@namespace      https://gf.qytechs.cn/users/137
@version        1.2.3
@license        MPL-2.0
@contributionURL https://www.amazon.co.jp/registry/wishlist/E7PJ5C3K7AM2
@compatible     Firefox
@compatible     Opera
@compatible     Chrome
@author         100の人
@homepageURL    https://gf.qytechs.cn/scripts/395307
==/UserStyle== */

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document regexp("https?://www\\.google\\.(?:com|(?:com?\\.)?[a-z][a-z])/(?!maps(?:$|.*)).*") {
	[data-async-context^="query:"] > div > div:last-of-type[data-hveid]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type:not([data-hveid]) {
		--sub-color: darkgreen;

		display: grid;
		grid-template:
			" title title "
			" url   option"
			/ auto  1fr;
	}

	[data-async-context^="query:"] > div > div:last-of-type[data-hveid]:not([id]):not([data-md]):not([class*="wholepage"]) cite {
		display: none;
	}

	[data-async-context^="query:"] > div > div:last-of-type[data-hveid]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > a {
		display: contents;
	}

	[data-async-context^="query:"] > div > div:last-of-type[data-hveid]:not([id]):not([data-md]):not([class*="wholepage"]) h3 {
		grid-area: title;
		white-space: nowrap;
	}

	[data-async-context^="query:"] > div > div:last-of-type[data-hveid]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > a::after {
		grid-area: url;
		content: attr(href);
		color: var(--sub-color);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	[data-async-context^="query:"] > div > div:last-of-type[data-hveid]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > div {
		grid-area: option;
		position: unset;
	}

	/*====================================
		Googleブックが通常検索に紛れる問題の対処
	*/
	[data-async-context^="query:"] > div > div:last-of-type[data-hveid]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > a[href^="https://books.google."] {
		display: block;
		white-space: nowrap;
	}

	[data-async-context^="query:"] > div > div:last-of-type[data-hveid]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > a[href^="https://books.google."]::after {
		content: none;
 	}
}

QingJ © 2025

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