Github查找活跃的Forks列表

Github显示活跃的Forks列表,可以快速了解各个分叉的热度,比如在主项目存档不维护时,就能知道有哪个新分叉有更新,

  1. // ==UserScript==
  2. // @name Github Find Active Forks
  3. // @name:zh-CN Github查找活跃的Forks列表
  4. // @namespace http://tampermonkey.net/
  5. // @version 1.0
  6. // @description allows you to find the most active forks of a repository.
  7. // @description:zh-CN Github显示活跃的Forks列表,可以快速了解各个分叉的热度,比如在主项目存档不维护时,就能知道有哪个新分叉有更新,
  8. // @author AndyWu
  9. // @homepageURL https://github.com/andywu188/
  10. // @match https://github.com/*
  11. // @run-at document-end
  12. // @grant none
  13. // @license LGPLv3
  14. // ==/UserScript==
  15. (function () {
  16. 'use strict'
  17. function applyNodeActivefork () {
  18. var activeforkNode = document.querySelector("#active-forks-button-repo");
  19. if (activeforkNode == null) {
  20. var pageheadaction = document.querySelector(".pagehead-actions");
  21. if (pageheadaction != null) {
  22. var tempNode = document.createElement('li');
  23. var repositoryLinkNode = document.querySelector("main .hx_page-header-bg .mr-2 a");
  24. if (repositoryLinkNode != null) {
  25. var repositoryLink = repositoryLinkNode.href;
  26. tempNode.innerHTML = '<details class="details-reset details-overlay f5 position-relative"><summary id="active-forks-button-repo" class="btn btn-sm"><svg class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 1.75a.75.75 0 00-1.5 0v12.5c0 .414.336.75.75.75h14.5a.75.75 0 000-1.5H1.5V1.75zm14.28 2.53a.75.75 0 00-1.06-1.06L10 7.94 7.53 5.47a.75.75 0 00-1.06 0L3.22 8.72a.75.75 0 001.06 1.06L7 7.06l2.47 2.47a.75.75 0 001.06 0l5.25-5.25z"></path></svg><font><a href="https://techgaun.github.io/active-forks/index.html#'+ repositoryLink +'" target="_blank">Active Forks</a></font></summary></details>';
  27. pageheadaction.appendChild(tempNode);
  28. }
  29. }
  30. }
  31. }
  32. var main = document.querySelector('main');
  33. if (main != null) {
  34. var observer = new MutationObserver(function (mutations, observer) {
  35. applyNodeActivefork();
  36. })
  37. observer.observe(main, {
  38. childList: true
  39. })
  40. applyNodeActivefork();
  41. }
  42. })()

QingJ © 2025

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