Google search "old style"

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

当前为 2021-07-27 提交的版本,查看 最新版本

  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.5
  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' 1
  17. @var checkbox head-mg '  Title margin' 1
  18. @var range line-h "  Text's line height" [1.48, 1.0, 1.7, .01]
  19. @var range bottom-mg '  Bottom margin' [15, 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 20210727.1427 v1.2.5 */
  25. /* google real values are: (20210626) line-h 1.57/1.58 - bottom-mg 27/30 */
  26.  
  27. /* font family */
  28. if set-font {
  29. .std, .g, .g h3 {
  30. font-family: font-f !important;
  31. letter-spacing: 0;
  32. }
  33. }
  34.  
  35. /* reduce result blocks font size */
  36. if font-size {
  37. .g {
  38. --font-sizeV: font-sizeV;
  39. --sz-norm: 14px;
  40. --sz-gblk: 16px;
  41. --margin-b: 27px;
  42. zoom: font-sizeV;
  43. }
  44. .g .g {
  45. zoom: unset;
  46. }
  47. /* target firefox as an alternative to "zoom" */
  48. @supports (-moz-appearance: none) {
  49. .g {
  50. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  51. margin-bottom: calc(var(--font-sizeV) * var(--margin-b)) !important;
  52. }
  53. .g.g-blk span > span {
  54. font-size: calc(var(--font-sizeV) * var(--sz-gblk));
  55. }
  56. .g cite {
  57. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  58. }
  59. .g h3 {
  60. font-size: calc(var(--font-sizeV) * 20px) !important;
  61. }
  62. }
  63. }
  64.  
  65. /* hide result favicon */
  66. if hide-favicon {
  67. .g img[height="16"][src*="data:image"][width="16"] {
  68. display: none;
  69. }
  70. }
  71.  
  72. /* invert the 2 lines */
  73. if invert-lines {
  74. .g div.r > a > br:first-child ~ h3,
  75. .g .rc > div.yuRUbf > a > br:first-child ~ h3,
  76. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3,
  77. .g > div.yuRUbf > a > br:first-child ~ h3 {
  78. display: block;
  79. }
  80. .g div.r > a > br:first-child ~ h3 ~ div,
  81. .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  82. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  83. .g > div.yuRUbf > a > br:first-child ~ h3 ~ div {
  84. position: static;
  85. margin-top: -0.2em;
  86. }
  87. .g div.r > a > br:first-child ~ h3 ~ div *,
  88. .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  89. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  90. .g > div.yuRUbf > a > br:first-child ~ h3 ~ div * {
  91. color: green !important;
  92. }
  93. .g div.r > a > br:first-child,
  94. .g .rc > div.yuRUbf > a > br:first-child,
  95. .g .tF2Cxc > div.yuRUbf > a > br:first-child,
  96. .g > div.yuRUbf > a > br:first-child {
  97. display: none;
  98. }
  99. .g div.r > a ~ div,
  100. .g .rc > div.yuRUbf > a ~ div,
  101. .g .tF2Cxc > div.yuRUbf > a ~ div,
  102. .g > div.yuRUbf > a ~ div {
  103. position: static;
  104. margin-top: -1.6em;
  105. margin-bottom: 1.6em;
  106. }
  107. }
  108.  
  109. /* whitespace */
  110. if get-ws {
  111. if head-mg {
  112. .g div.r > a > br:first-child ~ h3,
  113. .g .rc > div.yuRUbf > a > br:first-child ~ h3,
  114. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3,
  115. .g > div.yuRUbf > a > br:first-child ~ h3 {
  116. margin-bottom: -1px;
  117. }
  118. if invert-lines {
  119. }
  120. }
  121. if line-h != 1.57 {
  122. .g .st, .g .s > div,
  123. .g .rc .aCOpRe, .g .rc .IsZvec > div,
  124. .g .tF2Cxc .aCOpRe, .g .tF2Cxc .IsZvec > div, .g.tF2Cxc .IsZvec > div {
  125. line-height: line-h;
  126. }
  127. }
  128. if bottom-mg != 27px {
  129. .g {
  130. --margin-b: bottom-mg;
  131. margin-bottom: bottom-mg;
  132. }
  133. }
  134.  
  135. }
  136.  
  137. /* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
  138. .none {
  139. dummy:1;
  140. }
  141.  
  142. }