Github1s

One second to read GitHub code with VS Code.

目前为 2021-02-10 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @namespace https://github.com/JackieZheng
  3. // @name Github1s
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.1
  6. // @description One second to read GitHub code with VS Code.
  7. // @author JackieZheng
  8. // @match https://github.com/*/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. var github1sBtn = document.createElement("li");
  15. github1sBtn.innerHTML ='Github1s';
  16. github1sBtn.className='open-on-sourcegraph btn btn-sm tooltipped tooltipped-s';
  17. var li=document.getElementsByClassName('pagehead-actions flex-shrink-0 d-none d-md-inline').item(0).getElementsByTagName('li')[0]
  18. document.getElementsByClassName('pagehead-actions flex-shrink-0 d-none d-md-inline').item(0).insertBefore(github1sBtn,li)
  19. github1sBtn.onclick=function()
  20. {
  21. var href=top.location.href.replace('github.com','github1s.com')
  22. top.location.href=href;
  23. }
  24. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址