Google Search in columns

This is a CSS that transform Google Search into multiple (default two) columns.

当前为 2019-08-03 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Google Search in columns
  3. // @namespace http://userstyles.org
  4. // @description This is a CSS that transform Google Search into multiple (default two) columns.
  5. // @author Crend King
  6. // @homepage https://userstyles.org/styles/123849
  7. // @include https://www.google.com/search?*
  8. // @run-at document-start
  9. // @version 0.20180901023744
  10. // ==/UserScript==
  11. (function() {var css = [
  12. "/* columns */",
  13. "",
  14. ".big .mw,",
  15. ".s {",
  16. " max-width: unset !important;",
  17. "}",
  18. "",
  19. ".col { ",
  20. " width: 100% !important;",
  21. "}",
  22. "",
  23. "#cnt .mw #center_col,",
  24. "#cnt .mw #foot {",
  25. " width: 100% !important;",
  26. "}",
  27. "",
  28. "#center_col {",
  29. " margin: auto !important;",
  30. " padding: inherit !important;",
  31. "}",
  32. "",
  33. "/* entries */",
  34. "",
  35. ".g {",
  36. " padding: 0.667em !important;",
  37. "}",
  38. "",
  39. ".srg {",
  40. " display: flex !important;",
  41. " flex-wrap: wrap !important;",
  42. "}",
  43. "",
  44. ".mw {",
  45. " width: 990em !important;",
  46. " max-width: 130em !important;",
  47. "}",
  48. "",
  49. ".srg > .g {",
  50. " width: calc(100% / 3 - 2.333em) !important;",
  51. " margin-left: 0.5em !important;",
  52. " margin-right: 0.5em !important;",
  53. " overflow: hidden !important;",
  54. "}",
  55. "",
  56. ".rgsep {",
  57. " display: none !important;",
  58. "}",
  59. "",
  60. "/* info box */",
  61. "",
  62. ".vk_c,",
  63. ".kp-blk {",
  64. " margin: auto !important;",
  65. "}"
  66. ].join("\n");
  67. if (typeof GM_addStyle != "undefined") {
  68. GM_addStyle(css);
  69. } else if (typeof PRO_addStyle != "undefined") {
  70. PRO_addStyle(css);
  71. } else if (typeof addStyle != "undefined") {
  72. addStyle(css);
  73. } else {
  74. var node = document.createElement("style");
  75. node.type = "text/css";
  76. node.appendChild(document.createTextNode(css));
  77. var heads = document.getElementsByTagName("head");
  78. if (heads.length > 0) {
  79. heads[0].appendChild(node);
  80. } else {
  81. // no head yet, stick it whereever
  82. document.documentElement.appendChild(node);
  83. }
  84. }
  85. })();