Search Align Fucker (simple impl)

a simple implementation of moving search result to page center and that's google and bing.

Verze ze dne 30. 01. 2023. Zobrazit nejnovější verzi.

  1. // ==UserScript==
  2. // @name Search Align Fucker (simple impl)
  3.  
  4. // @version 0.0.0.1
  5. // @author Heizi黑字
  6. // @description a simple implementation of moving search result to page center and that's google and bing.
  7. // @license GPL-3.0 License
  8. // @grant GM.setValue
  9. // @grant GM.getValue
  10. // @match https?://(www\.)?(google|bing)\.(.)+/search\?.+
  11. // @run-at document-end
  12. // @supportURL https://github.com/ElisaMin/justify-search-page-to-center
  13. // @homepageURL https://github.com/ElisaMin/justify-search-page-to-center
  14. // @name:zh-CN 居中啊!他娘的搜索引擎!
  15. // @description:zh-CN 简单加点padding把搜索结果移到中间。
  16. // @namespace https://greatest.deepsurf.us/users/1018732
  17. // ==/UserScript==
  18. (()=>{
  19. let css = (dom,style,value) => $(dom).style[style] = value;
  20. let pl = (dom,paddingLeft) => css(dom,"padding-left",paddingLeft);
  21. let rem = (v)=>v+"rem";
  22. let paddingLeft = 41;
  23. pl("#b_header",rem(paddingLeft));
  24. pl("#b_content",rem(paddingLeft+10.5));
  25. })();