Google Search Display URL

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

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

  1. /* ==UserStyle==
  2. @name Google Search Display URL
  3. @name:ja Google検索 URLを表示
  4. @description Display page URLs under the page names (legacy feature).
  5. @description:ja 以前のようにページ名の下へURLを表示します。
  6. @namespace https://greasyfork.org/users/137
  7. @version 1.3.0
  8. @license MPL-2.0
  9. @contributionURL https://www.amazon.co.jp/registry/wishlist/E7PJ5C3K7AM2
  10. @compatible Firefox
  11. @compatible Opera
  12. @compatible Chrome
  13. @author 100の人
  14. @homepageURL https://greasyfork.org/scripts/395307
  15. ==/UserStyle== */
  16.  
  17. /*
  18. 【動作確認用】
  19. サイトリンク付き
  20. https://www.google.com/search?q=Greasy+Fork
  21. 動画再生フォーム
  22. 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
  23. 電卓
  24. https://www.google.com/search?q=1-1
  25. 翻訳フォーム
  26. https://www.google.com/search?q=test
  27. 乱数生成フォーム / このページを訳す
  28. https://www.google.com/search?q=random+number
  29. 宅配便の追跡リンク
  30. https://www.google.com/search?q=999999999994
  31. Twitter
  32. https://www.google.com/search?q=Twitter
  33. */
  34.  
  35. @namespace url(http://www.w3.org/1999/xhtml);
  36.  
  37. @-moz-document regexp("https?://www\\.google\\.(?:com|(?:com?\\.)?[a-z][a-z])/(?!maps(?:$|.*)).*") {
  38. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type:not([data-hveid]),
  39. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]) h3 a, /* 動画再生フォーム */
  40. [data-async-context^="query:"] g-section-with-header g-link a { /* Twitter */
  41. --sub-color: darkgreen;
  42.  
  43. display: grid;
  44. grid-template:
  45. " title title "
  46. " url option"
  47. / auto 1fr;
  48. }
  49.  
  50. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"]) cite,
  51. [data-async-context^="query:"] g-section-with-header cite { /* Twitter */
  52. display: none;
  53. }
  54.  
  55. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > a {
  56. display: contents;
  57. }
  58.  
  59. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"]) h3 {
  60. grid-area: title;
  61. white-space: nowrap;
  62. }
  63.  
  64. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > a::after,
  65. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]) h3 a::after, /* 動画再生フォーム */
  66. [data-async-context^="query:"] g-section-with-header g-link a::after { /* Twitter */
  67. grid-area: url;
  68. content: attr(href);
  69. color: var(--sub-color);
  70. white-space: nowrap;
  71. overflow: hidden;
  72. text-overflow: ellipsis;
  73. font-size: 13px; /* Twitter */
  74. }
  75.  
  76. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > div {
  77. grid-area: option;
  78. position: unset;
  79. }
  80.  
  81. /*====================================
  82. Googleブックが通常検索に紛れる問題の対処
  83. */
  84. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > a[href^="https://books.google."] {
  85. display: block;
  86. white-space: nowrap;
  87. }
  88.  
  89. [data-async-context^="query:"] div:last-of-type[data-hveid][data-ved]:not([id]):not([data-md]):not([class*="wholepage"]) > div:first-of-type > a[href^="https://books.google."]::after {
  90. content: none;
  91. }
  92. }