Greasy Fork is available in English.

谷歌居中

Center the Google search results.

  1. // ==UserScript==
  2. // @name 谷歌居中
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.3
  5. // @description Center the Google search results.
  6. // @author GDUFXRT
  7. // @match https://www.google.com/search*
  8. // @run-at document-start
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. var style = document.createElement('style');
  15. var cssStyle = `@media(min-width:1410px)
  16. {#extabar {display: flex;justify-content: left;}
  17. #slim_appbar {width: 1280px;margin-left:0;box-sizing: border-box;display:flex;justify-content:center}
  18. #searchform .tsf{margin:0 auto}
  19. .MUFPAc{margin-left:0}
  20. .mw{margin:0 auto}
  21. #fbar{text-align:center}
  22. .GyAeWb{display:flex;justify-content:space-around}
  23. #main{display:flex;justify-content:center;}
  24. #topabar{max-width:1197px;margin:0 auto;min-width:1100px}
  25.  
  26. .GLcBOb{justify-content:center;display: flex;}
  27. .D6j0vc{width:auto}}`;
  28.  
  29. style.innerText = cssStyle;
  30. document.querySelector('head').appendChild(style);
  31. })();