GitHub 加速 (Releases)

通过代理为 GitHub Releases 提供加速

安装此脚本?
作者推荐脚本

您可能也喜欢GitHub 加速 (Raw)

安装此脚本
  1. // ==UserScript==
  2. // @name GitHub 加速 (Releases)
  3. // @namespace https://mogeko.me
  4. // @version 0.2.10
  5. // @author Zheng Junyi
  6. // @description 通过代理为 GitHub Releases 提供加速
  7. // @license MIT
  8. // @icon https://besticon.herokuapp.com/icon?size=80..120..200&url=github.com
  9. // @homepage https://github.com/mogeko/userscripts/tree/master/packages/ghproxy-releases#readme
  10. // @homepageURL https://github.com/mogeko/userscripts/tree/master/packages/ghproxy-releases#readme
  11. // @source https://github.com/mogeko/userscripts.git
  12. // @supportURL https://github.com/mogeko/userscripts/issues
  13. // @match https://github.com/**
  14. // @grant none
  15. // @run-at document-end
  16. // ==/UserScript==
  17.  
  18. (function () {
  19. 'use strict';
  20.  
  21. const PROXY_URL = "https://ghproxy.com/";
  22. function agentReleases(proxy) {
  23. for (const svg of document.querySelectorAll(
  24. ".octicon-package, .octicon-file-zip"
  25. )) {
  26. const link = svg.parentNode;
  27. link.href = proxy + link.href;
  28. }
  29. }
  30. agentReleases(PROXY_URL);
  31. document.addEventListener("pjax:success", () => {
  32. agentReleases(PROXY_URL);
  33. });
  34.  
  35. })();

QingJ © 2025

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