Google search "old style"

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

  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.14
  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 rmv-title 'Remove site title' 1
  14. @var checkbox invert-lines 'Invert lines' 1
  15. @var checkbox font-size 'Reduce results font size' 1
  16. @var range font-sizeV '  size' [0.9, 0.7, 1, 0.01]
  17. @var checkbox get-ws 'Recover whitespace' 1
  18. @var checkbox head-mg '  Title margin' 1
  19. @var range line-h "  Text's line height" [1.48, 1.0, 1.7, .01]
  20. @var range bottom-mg '  Bottom margin' [15, 0, 30, 1, 'px']
  21. @var checkbox set-font 'Change font' 0
  22. @var text font-f '  Font family' 'arial,sans-serif'
  23. ==/UserStyle== */
  24. @-moz-document regexp("^https:\\/\\/www.google\\..*?\\/search\\?.*") {
  25. /* version 20230220.1 v1.2.12 */
  26. /* google real values are: (20210626) line-h 1.57/1.58 - bottom-mg 27/30 */
  27.  
  28. /* font family */
  29. if set-font {
  30. .std, .g, .g h3 {
  31. font-family: font-f !important;
  32. letter-spacing: 0;
  33. }
  34. }
  35.  
  36. /* reduce result blocks font size */
  37. if font-size {
  38. .g {
  39. --font-sizeV: font-sizeV;
  40. --sz-norm: 14px;
  41. --sz-gblk: 16px;
  42. --margin-b: 27px;
  43. zoom: font-sizeV;
  44. }
  45. .g .g {
  46. zoom: unset;
  47. }
  48. /* target firefox as an alternative to "zoom" */
  49. @supports (-moz-appearance: none) {
  50. .g {
  51. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  52. margin-bottom: calc(var(--font-sizeV) * var(--margin-b)) !important;
  53. }
  54. .g.g-blk span > span {
  55. font-size: calc(var(--font-sizeV) * var(--sz-gblk));
  56. }
  57. .g cite {
  58. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  59. }
  60. .g h3 {
  61. font-size: calc(var(--font-sizeV) * 20px) !important;
  62. }
  63. }
  64. }
  65.  
  66. /* hide result favicon */
  67. if hide-favicon {
  68. .g img[height="16"][src*="data:image"][width="16"],
  69. .g div.yuRUbf a > h3 + div > .H9lube, .g div.yuRUbf a + div > div > span /*20230220*/,
  70. .g div.DhN8Cf a > h3 + div > .H9lube, .g div.DhN8Cf a + div > div > span /*20230413 variation*/ {
  71. display: none;
  72. }
  73. }
  74.  
  75. /* hide site title 202302 */
  76. if rmv-title or invert-lines {
  77. .g div.yuRUbf a > h3 + div > div > span, .g div.yuRUbf a + div > div > div > span,
  78. .g div.DhN8Cf a > h3 + div > div > span, .g div.DhN8Cf a + div > div > div > span /*20230413 variation*/ {
  79. display: none;
  80. }
  81. .g div.yuRUbf a > h3,
  82. .g div.DhN8Cf a > h3 /*20230413 variation*/ {
  83. margin-top: 0;
  84. }
  85. .g div.yuRUbf a + div > div:first-child + div,
  86. .g div.DhN8Cf a + div > div:first-child + div /*20230413 variation*/ {
  87. margin-top: 0;
  88. }
  89. if hide-favicon or invert-lines {
  90. .g div.yuRUbf a + div > div:first-child + div,
  91. .g div.DhN8Cf a + div > div:first-child + div /*20230413 variation*/ {
  92. margin-top: -0.4em;
  93. }
  94. }
  95. }
  96.  
  97. /* invert the 2 lines */
  98. if invert-lines {
  99. .g div.r > a > br:first-child ~ h3,
  100. .g .rc > div.yuRUbf > a > br:first-child ~ h3,
  101. .g .tF2Cxc div.yuRUbf > a > br:first-child ~ h3,
  102. .g .jtfYYd div.yuRUbf > a > br:first-child ~ h3,
  103. .g .GLI8Bc div.yuRUbf > a > br:first-child ~ h3,
  104. .g > div.yuRUbf > a > br:first-child ~ h3,
  105. .g > div.Y3iVZd g-link > a > br:first-child ~ h3,
  106. .g div.ct3b9e > a > br:first-child ~ h3,
  107. .g div.yuRUbf a > br:first-child ~ h3,
  108. .g div.DhN8Cf a > br:first-child ~ h3 /*20230413 variation*/ {
  109. display: block;
  110. }
  111. .g div.r > a > br:first-child ~ h3 ~ div,
  112. .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  113. .g .tF2Cxc div.yuRUbf > a > br:first-child ~ h3 ~ div,
  114. .g .jtfYYd div.yuRUbf > a > br:first-child ~ h3 ~ div,
  115. .g .GLI8Bc div.yuRUbf > a > br:first-child ~ h3 ~ div,
  116. .g > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  117. .g > div.Y3iVZd g-link > a > br:first-child ~ h3 ~ div,
  118. .g div.ct3b9e > a > br:first-child ~ h3 ~ div,
  119. .g div.yuRUbf a > br:first-child ~ h3 ~ div,
  120. .g div.DhN8Cf a > br:first-child ~ h3 ~ div /*20230413 variation*/ {
  121. position: static;
  122. margin-top: -0.2em;
  123. }
  124. .g div.r > a > br:first-child ~ h3 ~ div *,
  125. .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  126. .g .tF2Cxc div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  127. .g .jtfYYd div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  128. .g .GLI8Bc div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  129. .g > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  130. .g > div.Y3iVZd g-link > a > br:first-child ~ h3 ~ div *,
  131. .g div.ct3b9e > a > br:first-child ~ h3 ~ div *,
  132. .g div.yuRUbf a > br:first-child ~ h3 ~ div *,
  133. .g div.DhN8Cf a > br:first-child ~ h3 ~ div * /*20230413 variation*/ {
  134. color: green !important;
  135. }
  136. .g div.r > a > br:first-child,
  137. .g .rc > div.yuRUbf > a > br:first-child,
  138. .g .tF2Cxc div.yuRUbf > a > br:first-child,
  139. .g .jtfYYd div.yuRUbf > a > br:first-child,
  140. .g .GLI8Bc div.yuRUbf > a > br:first-child,
  141. .g > div.yuRUbf > a > br:first-child,
  142. .g > div.Y3iVZd g-link > a > br:first-child,
  143. .g div.ct3b9e > a > br:first-child,
  144. .g div.yuRUbf a > br:first-child,
  145. .g div.DhN8Cf a > br:first-child /*20230413 variation*/ {
  146. display: none;
  147. }
  148. .g div.r > a ~ div,
  149. .g .rc > div.yuRUbf > a ~ div,
  150. .g .tF2Cxc div.yuRUbf > a ~ div,
  151. .g .jtfYYd div.yuRUbf > a ~ div,
  152. .g .GLI8Bc div.yuRUbf > a ~ div,
  153. .g > div.yuRUbf > a ~ div,
  154. .g > div.Y3iVZd g-link > a ~ div,
  155. .g div.yuRUbf a ~ div,
  156. .g div.DhN8Cf a ~ div /*20230413 variation*/ {
  157. position: static;
  158. margin-top: -1.7em;
  159. height: auto;
  160. }
  161.  
  162. .g > div.Y3iVZd > div > .M42dy {
  163. margin-bottom: 0;
  164. }
  165.  
  166. .g h3 + div .GvPZzd, .g a + div div .GvPZzd {
  167. font-size: var(--sz-norm);
  168. line-height: 1.3rem;
  169. }
  170. .g h3 + div .byrV5b, .g a + div div .byrV5b {
  171. padding-top: 1px;
  172. }
  173. }
  174.  
  175. /* whitespace */
  176. if get-ws {
  177. if head-mg {
  178. .g div.r > a > br:first-child ~ h3,
  179. .g .rc > div.yuRUbf > a > br:first-child ~ h3,
  180. .g .tF2Cxc div.yuRUbf > a > br:first-child ~ h3,
  181. .g .jtfYYd div.yuRUbf > a > br:first-child ~ h3,
  182. .g .GLI8Bc div.yuRUbf > a > br:first-child ~ h3,
  183. .g > div.yuRUbf > a > br:first-child ~ h3,
  184. .g > div.Y3iVZd g-link > a > br:first-child ~ h3,
  185. .g div.ct3b9e > a > br:first-child ~ h3,
  186. .g div.yuRUbf a > br:first-child ~ h3,
  187. .g div.DhN8Cf a > br:first-child ~ h3 {
  188. margin-bottom: -1px;
  189. }
  190. if invert-lines {
  191. }
  192. }
  193. if line-h != 1.57 {
  194. .g .st, .g .s > div,
  195. .g .rc .aCOpRe, .g .rc .IsZvec > div,
  196. .g .tF2Cxc .aCOpRe, .g .tF2Cxc .IsZvec > div, .g.tF2Cxc .IsZvec > div,
  197. .g .jtfYYd > [data-content-feature],
  198. .g .GLI8Bc > [data-content-feature],
  199. .g .dXiKIc > div *,
  200. .g div > [data-content-feature="1"],
  201. .g div > .Z26q7c:not(:first-child) /*20230422*/ {
  202. line-height: line-h;
  203. }
  204. }
  205. if bottom-mg != 27px {
  206. .g {
  207. --margin-b: bottom-mg;
  208. margin-bottom: bottom-mg !important;
  209. }
  210. /*sub-result 20220824*/
  211. .g ul.FxLDp {
  212. padding-top: 0;
  213. }
  214. }
  215.  
  216. }
  217.  
  218. /* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
  219. .none {
  220. dummy:1;
  221. }
  222.  
  223. }

QingJ © 2025

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