GitHub 加速 (Raw)

通过代理为 GitHub Raw Assets 提供加速

目前为 2021-05-31 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name GitHub 加速 (Raw)
  3. // @namespace https://mogeko.me
  4. // @version 0.1.1
  5. // @description 通过代理为 GitHub Raw Assets 提供加速
  6. // @author Mogeko
  7. // @supportURL https://github.com/Mogeko/user-script-ghproxy/issues
  8. // @match https://github.com/*/*
  9. // @exclude https://github.com/*/*/issues*
  10. // @exclude https://github.com/*/*/pulls*
  11. // @exclude https://github.com/*/*/actions*
  12. // @exclude https://github.com/*/*/projects*
  13. // @exclude https://github.com/*/*/wiki*
  14. // @exclude https://github.com/*/*/security*
  15. // @exclude https://github.com/*/*/pulse*
  16. // @exclude https://github.com/*/*/settings*
  17. // @icon https://github.githubassets.com/pinned-octocat.svg
  18. // @updataURL https://cdn.jsdelivr.net/gh/Mogeko/user-script-ghproxy@master/agentRaw/agentRaw.user.js
  19. // @run-at document-end
  20. // @grant none
  21. // @license MIT
  22. // ==/UserScript==
  23.  
  24. const PROXY_URL = "https://ghproxy.com/";
  25.  
  26. const agentRaw = proxy => {
  27. const rawButton = document.querySelector("#raw-url");
  28. if (rawButton) {
  29. rawButton.href = proxy + window.location.href;
  30. }
  31. }
  32.  
  33. (function() {
  34. 'use strict';
  35. agentRaw(PROXY_URL);
  36. document.addEventListener('pjax:success', () => {
  37. agentRaw(PROXY_URL);
  38. });
  39. })();

QingJ © 2025

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