Google search "old style"

Fix style in google search results page

当前为 2020-01-21 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. @name Google search "old style"
  3. @namespace https://github.com/Procyon-b
  4. @version 1.0.4
  5. @description Fix style in google search results page
  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. ==/UserStyle== */
  15. @-moz-document regexp("^https:\\/\\/www.google\\..*?\\/search\\?.*") {
  16. /* version 20200121.2100 v1.0.4 */
  17.  
  18. /* reduce result blocks font size */
  19. if font-size {
  20. .g {
  21. --font-sizeV: font-sizeV;
  22. --sz-norm: 14px;
  23. --sz-gblk: 16px;
  24. /*zoom: 90%;*/
  25. zoom: font-sizeV;
  26. }
  27. @supports (-moz-appearance: none) {
  28. .g {
  29. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  30. margin-bottom: calc(var(--font-sizeV) * 27px);
  31. }
  32. .g.g-blk span > span {
  33. font-size: calc(var(--font-sizeV) * var(--sz-gblk));
  34. }
  35. .g cite {
  36. font-size: calc(var(--font-sizeV) * var(--sz-norm));
  37. }
  38. .g h3 {
  39. font-size: calc(var(--font-sizeV) * 20px) !important;
  40. }
  41. }
  42. }
  43.  
  44. /* hide result favicon */
  45. if hide-favicon {
  46. .g img[height="16"][src*="data:image"][width="16"] {
  47. display: none;
  48. }
  49. }
  50.  
  51. /* invert the 2 lines */
  52. if invert-lines {
  53. .g .r > a {
  54. display: inline-flex;
  55. flex-flow: column;
  56. }
  57. .g .r > a > h3 {
  58. order: -1;
  59. }
  60. .g .r > a > div+br,
  61. .g .r > a br {
  62. display: none;
  63. }
  64. .g .r > a > div:first-child {
  65. order: 0;
  66. top: -0.5em;
  67. position: relative;
  68. }
  69. .g .r > a > div:first-child * {
  70. color: green !important;
  71. }
  72. .g .r > a > div:first-child cite {
  73. display: inline-block !important;
  74. }
  75. .r > div {
  76. position: relative;
  77. top: -2.1em;
  78. }
  79. }
  80.  
  81. /* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
  82. .none {
  83. dummy:1;
  84. }
  85.  
  86. }