GitHub File History

GitHub File History 快速跳转到 https://github.githistory.xyz/

  1. // ==UserScript==
  2. // @name GitHub File History
  3. // @namespace https://blog.xlab.app/
  4. // @more https://github.com/ttttmr/UserJS
  5. // @version 0.6
  6. // @description GitHub File History 快速跳转到 https://github.githistory.xyz/
  7. // @author tmr
  8. // @match https://github.com/*/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (async function () {
  13. "use strict";
  14. let count = 0;
  15. function run() {
  16. if (document.readyState == "complete" && count > 5) {
  17. return;
  18. }
  19. count++;
  20. let n = document.querySelector("a[aria-label='History']");
  21. if (n == null) {
  22. setTimeout(run, 500);
  23. return;
  24. }
  25.  
  26. let cn = n.cloneNode(true);
  27. cn.lastChild.textContent = "Git History";
  28. cn.href = cn.href.replace("github.com", "github.githistory.xyz");
  29. n.parentElement.append(cn);
  30. }
  31. run();
  32. })();

QingJ © 2025

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