Google search "old style"

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

当前为 2021-01-20 提交的版本,查看 最新版本

  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.0
  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' 'inherit'
  22. ==/UserStyle== */
  23. @-moz-document regexp("^https:\\/\\/www.google\\..*?\\/search\\?.*") {
  24. /* version 20210120.0100 v1.2.0 */
  25.  
  26. /* font family */
  27. if set-font {
  28. .std, .g, .g h3 {
  29. font-family: font-f;
  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. display: block;
  74. }
  75. .g div.r > a > br:first-child ~ h3 ~ div,
  76. .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  77. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 ~ div {
  78. position: static;
  79. margin-top: -0.2em;
  80. }
  81. .g div.r > a > br:first-child ~ h3 ~ div *,
  82. .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  83. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 ~ div * {
  84. color: green !important;
  85. }
  86. .g div.r > a > br:first-child,
  87. .g .rc > div.yuRUbf > a > br:first-child,
  88. .g .tF2Cxc > div.yuRUbf > a > br:first-child {
  89. display: none;
  90. }
  91. .g div.r > a ~ div,
  92. .g .rc > div.yuRUbf > a ~ div,
  93. .g .tF2Cxc > div.yuRUbf > a ~ div {
  94. position: static;
  95. margin-top: -1.6em;
  96. margin-bottom: 1.6em;
  97. }
  98. }
  99.  
  100. /* whitespace */
  101. if get-ws {
  102. if head-mg {
  103. .g div.r > a > br:first-child ~ h3,
  104. .g .rc > div.yuRUbf > a > br:first-child ~ h3,
  105. .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 {
  106. margin-bottom: -1px;
  107. }
  108. if invert-lines {
  109. }
  110. }
  111. if line-h != 1.57 {
  112. .g .st, .g .s > div,
  113. .g .rc .aCOpRe, .g .rc .IsZvec > div,
  114. .g .tF2Cxc .aCOpRe, .g .tF2Cxc .IsZvec > div {
  115. line-height: line-h;
  116. }
  117. }
  118. if bottom-mg != 27px {
  119. .g {
  120. --margin-b: bottom-mg;
  121. margin-bottom: bottom-mg;
  122. }
  123. }
  124.  
  125. }
  126.  
  127. /* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
  128. .none {
  129. dummy:1;
  130. }
  131.  
  132. }