Google search "old style"

Fix style in google search results page

目前為 2020-01-26 提交的版本,檢視 最新版本

  1. /* ==UserStyle==
  2. @name Google search "old style"
  3. @namespace https://github.com/Procyon-b
  4. @version 1.0.6.1
  5. @description Fix style in google search results page
  6. @author Achernar
  7. @license CC BY-NC 4.0
  8. @preprocessor stylus
  9.  
  10. @var checkbox hide-favicon 'Hide favicons' 1
  11. @var checkbox invert-lines 'Invert lines' 1
  12. @var checkbox font-size 'Reduce results font size' 1
  13. @var range font-sizeV 'size' [0.9, 0.7, 1, 0.01]
  14. @var checkbox get-ws 'Recover whitespace' 0
  15. @var checkbox head-mg 'Title margin' 1
  16. @var range line-h "Text's line height" [1.57, 1.0, 1.7, .01]
  17. @var range bottom-mg 'Bottom margin' [27, 0, 30, 1, 'px']
  18. ==/UserStyle== */
  19. @-moz-document regexp("^https:\\/\\/www.google\\..*?\\/search\\?.*") {
  20. /* version 20200125.2300 v1.0.6 */
  21.  
  22. /* reduce result blocks font size */
  23. if font-size {
  24. .g {
  25. --font-sizeV: font-sizeV;
  26. --sz-norm: 14px;
  27. --sz-gblk: 16px;
  28. --margin-b: 27px;
  29. /*zoom: 90%;*/
  30. zoom: font-sizeV;
  31. }
  32. @supports (-moz-appearance: none) {
  33. .g {
  34. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  35. margin-bottom: calc(var(--font-sizeV) * var(--margin-b)) !important;
  36. }
  37. .g.g-blk span > span {
  38. font-size: calc(var(--font-sizeV) * var(--sz-gblk));
  39. }
  40. .g cite {
  41. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  42. }
  43. .g h3 {
  44. font-size: calc(var(--font-sizeV) * 20px) !important;
  45. }
  46. }
  47. }
  48.  
  49. /* hide result favicon */
  50. if hide-favicon {
  51. .g img[height="16"][src*="data:image"][width="16"] {
  52. display: none;
  53. }
  54. }
  55.  
  56. /* invert the 2 lines */
  57. if invert-lines {
  58. .g .r > a {
  59. display: inline-flex;
  60. flex-flow: column;
  61. }
  62. .g .r > a > * + h3 {
  63. order: 0;
  64. }
  65. .g .r > a > div+br,
  66. .g .r > a br {
  67. display: none;
  68. }
  69. .g .r > a > div:first-child {
  70. order: 2;
  71. top: -0.5em;
  72. position: relative;
  73. }
  74. .g .r > a > h3 ~ div {
  75. position: relative;
  76. }
  77. .g .r > a > div:first-child * {
  78. color: green !important;
  79. }
  80. .g .r > a > div:first-child cite {
  81. display: inline-block !important;
  82. }
  83. .g .r > a > h3 ~ div cite {
  84. display: inline-block !important;
  85. padding: 0;
  86. }
  87. .g .r > div {
  88. position: relative;
  89. top: -2.1em;
  90. }
  91. }
  92.  
  93. /* whitespace */
  94. if get-ws {
  95. if head-mg {
  96. .g .r > a > div:first-child {
  97. margin-bottom: -7px;
  98. }
  99. if invert-lines {
  100. .g .r > div {
  101. top: calc(-2.1em + 7px);
  102. }
  103. }
  104. }
  105. if line-h != 1.57 {
  106. .g .st, .g .s > div {
  107. line-height: line-h;
  108. }
  109. }
  110. if bottom-mg != 27px {
  111. .g {
  112. --margin-b: bottom-mg;
  113. margin-bottom: bottom-mg;
  114. }
  115. }
  116. }
  117.  
  118. /* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
  119. .none {
  120. dummy:1;
  121. }
  122.  
  123. }

QingJ © 2025

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