Google search "old style"

Change style in google search results page to look like the old design

当前为 2021-06-26 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. @name:fr Google page de résultats "classique"
  3. @name Google search "old style"
  4. @namespace https://github.com/Procyon-b
  5. @version 1.2.2
  6. @description:fr Change le style dans la page de résultats de google pour ressembler à l'ancien design (2019, sans icône)
  7. @description Change style in google search results page to look like the old design
  8. @author Achernar
  9. @license CC BY-NC 4.0
  10. @preprocessor stylus
  11.  
  12. @var checkbox hide-favicon 'Hide favicons' 1
  13. @var checkbox invert-lines 'Invert lines' 1
  14. @var checkbox font-size 'Reduce results font size' 1
  15. @var range font-sizeV '  size' [0.9, 0.7, 1, 0.01]
  16. @var checkbox get-ws 'Recover whitespace' 0
  17. @var checkbox head-mg '  Title margin' 1
  18. @var range line-h "  Text's line height" [1.57, 1.0, 1.7, .01]
  19. @var range bottom-mg '  Bottom margin' [27, 0, 30, 1, 'px']
  20. @var checkbox set-font 'Change font' 0
  21. @var text font-f '  Font family' 'arial,sans-serif'
  22. ==/UserStyle== */
  23. @-moz-document regexp("^https:\\/\\/www.google\\..*?\\/search\\?.*") {
  24. /* version 20210626.0000 v1.2.2 */
  25.  
  26. /* font family */
  27. if set-font {
  28. .std, .g, .g h3 {
  29. font-family: font-f !important;
  30. }
  31. }
  32.  
  33. /* reduce result blocks font size */
  34. if font-size {
  35. .g {
  36. --font-sizeV: font-sizeV;
  37. --sz-norm: 14px;
  38. --sz-gblk: 16px;
  39. --margin-b: 27px;
  40. /*zoom: 90%;*/
  41. zoom: font-sizeV;
  42. }
  43. /* target firefox as an alternative to "zoom" */
  44. @supports (-moz-appearance: none) {
  45. .g {
  46. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  47. margin-bottom: calc(var(--font-sizeV) * var(--margin-b)) !important;
  48. }
  49. .g.g-blk span > span {
  50. font-size: calc(var(--font-sizeV) * var(--sz-gblk));
  51. }
  52. .g cite {
  53. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  54. }
  55. .g h3 {
  56. font-size: calc(var(--font-sizeV) * 20px) !important;
  57. }
  58. }
  59. }
  60.  
  61. /* hide result favicon */
  62. if hide-favicon {
  63. .g img[height="16"][src*="data:image"][width="16"] {
  64. display: none;
  65. }
  66. }
  67.  
  68. /* invert the 2 lines */
  69. if invert-lines {
  70. .g div.r > a > br:first-child ~ h3,
  71. .g .rc > div.yuRUbf > a > br:first-child ~ h3,
  72. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3,
  73. .g > div.yuRUbf > a > br:first-child ~ h3 {
  74. display: block;
  75. }
  76. .g div.r > a > br:first-child ~ h3 ~ div,
  77. .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  78. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  79. .g > div.yuRUbf > a > br:first-child ~ h3 ~ div {
  80. position: static;
  81. margin-top: -0.2em;
  82. }
  83. .g div.r > a > br:first-child ~ h3 ~ div *,
  84. .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  85. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  86. .g > div.yuRUbf > a > br:first-child ~ h3 ~ div * {
  87. color: green !important;
  88. }
  89. .g div.r > a > br:first-child,
  90. .g .rc > div.yuRUbf > a > br:first-child,
  91. .g .tF2Cxc > div.yuRUbf > a > br:first-child,
  92. .g > div.yuRUbf > a > br:first-child {
  93. display: none;
  94. }
  95. .g div.r > a ~ div,
  96. .g .rc > div.yuRUbf > a ~ div,
  97. .g .tF2Cxc > div.yuRUbf > a ~ div,
  98. .g > div.yuRUbf > a ~ div {
  99. position: static;
  100. margin-top: -1.6em;
  101. margin-bottom: 1.6em;
  102. }
  103. }
  104.  
  105. /* whitespace */
  106. if get-ws {
  107. if head-mg {
  108. .g div.r > a > br:first-child ~ h3,
  109. .g .rc > div.yuRUbf > a > br:first-child ~ h3,
  110. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3,
  111. .g > div.yuRUbf > a > br:first-child ~ h3 {
  112. margin-bottom: -1px;
  113. }
  114. if invert-lines {
  115. }
  116. }
  117. if line-h != 1.57 {
  118. .g .st, .g .s > div,
  119. .g .rc .aCOpRe, .g .rc .IsZvec > div,
  120. .g .tF2Cxc .aCOpRe, .g .tF2Cxc .IsZvec > div, .g.tF2Cxc .IsZvec > div {
  121. line-height: line-h;
  122. }
  123. }
  124. if bottom-mg != 27px {
  125. .g {
  126. --margin-b: bottom-mg;
  127. margin-bottom: bottom-mg;
  128. }
  129. }
  130.  
  131. }
  132.  
  133. /* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
  134. .none {
  135. dummy:1;
  136. }
  137.  
  138. }