Google search "old style"

Fix style in google search results page

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

  1. /* ==UserStyle==
  2. @name Google search "old style"
  3. @namespace https://github.com/Procyon-b
  4. @version 1.0.3
  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 20200119.2130 */
  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. img[height="16"][src*="data:image"][width="16"] {
  47. display: none;
  48. }
  49. }
  50.  
  51. /* invert the 2 lines */
  52. if invert-lines {
  53. br + h3 {
  54. position: relative;
  55. top: -1.2em;
  56. }
  57.  
  58. div.r > a > div:first-child {
  59. position: relative;
  60. top: 1.9em;
  61. }
  62. div.r > a > div:first-child * {
  63. color: green;
  64. }
  65.  
  66. div.r > a + div {
  67. top: 1.9em;
  68. }
  69. }
  70.  
  71. /* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
  72. .none {
  73. dummy:1;
  74. }
  75.  
  76. }