Google Search Display URL

Display URLs for each search result as before.

  1. /* ==UserStyle==
  2. @name Google Search Display URL
  3. @name:ja Google検索 URLを表示
  4. @description Display URLs for each search result as before.
  5. @description:ja 以前のように各検索結果へURLを表示します。
  6. @namespace https://greasyfork.org/users/137
  7. @version 2.0.0
  8. @license MPL-2.0
  9. @contributionURL https://github.com/sponsors/esperecyan
  10. @compatible Edge
  11. @compatible Firefox 推奨 (Recommended)
  12. @compatible Opera
  13. @compatible Chrome
  14. @author 100の人 (エスパー・イーシア)
  15. @homepageURL https://greasyfork.org/scripts/395307
  16. ==/UserStyle== */
  17.  
  18. /*
  19. 【動作確認用】
  20. サイトリンク付き
  21. https://www.google.com/search?q=Greasy+Fork
  22. https://www.google.com/search?q=Twitter
  23. 動画再生フォーム
  24. https://www.google.com/search?q=%E5%A5%BD%E3%81%8D!%E9%9B%AA!%E6%9C%AC%E6%B0%97%E3%83%9E%E3%82%B8%E3%83%83%E3%82%AF
  25. 電卓
  26. https://www.google.com/search?q=1-1
  27. 翻訳フォーム
  28. https://www.google.com/search?q=test
  29. 乱数生成フォーム / このページを訳す
  30. https://www.google.com/search?q=random+number
  31. */
  32.  
  33. @namespace url(http://www.w3.org/1999/xhtml);
  34.  
  35. @-moz-document url("https://www.google.com/search?q=Greasy%20Fork"), url("https://www.google.co.jp/search?q=Greasy%20Fork"), /* Greasy Forkの適用サイト用 */
  36. regexp("https?://www\\.google\\.(?:com|(?:com?\\.)?[a-z][a-z])/(?!(?:webhp$|$)|maps(?:$|.*)|search\\?(.*&)?(?:tbm=lcl|tbs=lrf|udm=2)(?:$|.*)).*") {
  37. .yuRUbf > div,
  38. [data-async-context^="query:"] div[data-hveid][data-ved]:not([id]):not([data-md]) h3 a {
  39. --url-color: #4D5156;
  40. --icon-size: 26px;
  41. --icon-margin-right: 12px;
  42.  
  43. display: grid;
  44. grid-template:
  45. " icon site site"
  46. " icon url option"
  47. " title title title"
  48. / calc(var(--icon-size) + var(--icon-margin-right)) min-content auto;
  49. }
  50. table h3 a {
  51. /* サイトリンク */
  52. display: block !important;
  53. }
  54.  
  55. [data-async-context^="query:"] :is(
  56. div[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"])
  57. ) cite {
  58. display: none;
  59. }
  60.  
  61. .yuRUbf > div > span,
  62. .yuRUbf > div > span > a {
  63. display: contents;
  64. }
  65.  
  66. :is(
  67. .yuRUbf > div,
  68. [data-async-context^="query:"] g-section-with-header g-link
  69. ) h3 {
  70. grid-area: title;
  71. white-space: nowrap;
  72. transform: unset !important;
  73. }
  74.  
  75. .yuRUbf > div h3 ~ div,
  76. .yuRUbf > div h3 ~ div > div {
  77. display: contents !important;
  78. }
  79.  
  80. .yuRUbf > div h3 ~ div > div > span {
  81. grid-area: icon;
  82. align-self: center;
  83. }
  84.  
  85. .yuRUbf > div h3 ~ div > div > div {
  86. grid-area: site;
  87. }
  88.  
  89. :is(
  90. .yuRUbf > div > a,
  91. .yuRUbf > div > span > a
  92. )::after {
  93. grid-area: url;
  94. content: attr(href);
  95. color: var(--url-color);
  96. white-space: nowrap;
  97. overflow: hidden;
  98. text-overflow: ellipsis;
  99. }
  100. table a::after {
  101. /* サイトリンク */
  102. content: unset !important;
  103. }
  104.  
  105. .yuRUbf > div > div {
  106. grid-area: option;
  107. position: unset;
  108. width: 18px;
  109. }
  110.  
  111. .yuRUbf > div > div > div:first-of-type {
  112. display: none;
  113. }
  114.  
  115. .yuRUbf > div > div > div:nth-of-type(2) {
  116. margin-top: unset;
  117. }
  118. }