Google search "old style"

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

目前为 2020-09-24 提交的版本。查看 最新版本

  1. /* ==UserStyle==
  2. @name Google search "old style"
  3. @namespace https://github.com/Procyon-b
  4. @version 1.1.0
  5. @description Change style in google search results page to look like the old design
  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 20200923.2300 v1.1.0 */
  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. /* target firefox as an alternative to "zoom" */
  33. @supports (-moz-appearance: none) {
  34. .g {
  35. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  36. margin-bottom: calc(var(--font-sizeV) * var(--margin-b)) !important;
  37. }
  38. .g.g-blk span > span {
  39. font-size: calc(var(--font-sizeV) * var(--sz-gblk));
  40. }
  41. .g cite {
  42. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  43. }
  44. .g h3 {
  45. font-size: calc(var(--font-sizeV) * 20px) !important;
  46. }
  47. }
  48. }
  49.  
  50. /* hide result favicon */
  51. if hide-favicon {
  52. .g img[height="16"][src*="data:image"][width="16"] {
  53. display: none;
  54. }
  55. }
  56.  
  57. /* invert the 2 lines */
  58. if invert-lines {
  59. .g div.r > a > br:first-child ~ h3,
  60. .g > .rc > div.yuRUbf > a > br:first-child ~ h3 {
  61. display: block;
  62. }
  63. .g div.r > a > br:first-child ~ h3 ~ div,
  64. .g > .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div {
  65. position: static;
  66. margin-top: -0.2em;
  67. }
  68. .g div.r > a > br:first-child ~ h3 ~ div *,
  69. .g > .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div * {
  70. color: green !important;
  71. }
  72. .g div.r > a > br:first-child,
  73. .g > .rc > div.yuRUbf > a > br:first-child {
  74. display: none;
  75. }
  76. .g div.r > a ~ div,
  77. .g > .rc > div.yuRUbf > a ~ div {
  78. position: static;
  79. margin-top: -1.6em;
  80. margin-bottom: 1.6em;
  81. }
  82. }
  83.  
  84. /* whitespace */
  85. if get-ws {
  86. if head-mg {
  87. .g div.r > a > br:first-child ~ h3,
  88. .g > .rc > div.yuRUbf > a > br:first-child ~ h3 {
  89. margin-bottom: -1px;
  90. }
  91. if invert-lines {
  92. }
  93. }
  94. if line-h != 1.57 {
  95. .g .st, .g .s > div,
  96. .g .rc .aCOpRe, .g .rc .IsZvec > div {
  97. line-height: line-h;
  98. }
  99. }
  100. if bottom-mg != 27px {
  101. .g {
  102. --margin-b: bottom-mg;
  103. margin-bottom: bottom-mg;
  104. }
  105. }
  106. }
  107.  
  108. /* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
  109. .none {
  110. dummy:1;
  111. }
  112.  
  113. }

QingJ © 2025

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