Modify GitHub Fork Button Text

Change "Fork" button text to "Fork and Apply to YC" on GitHub

  1. // ==UserScript==
  2. // @name Modify GitHub Fork Button Text
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Change "Fork" button text to "Fork and Apply to YC" on GitHub
  6. // @author Naveen MC (https://github.com/mcnaveen)
  7. // @match *://github.com/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. function modifyForkButton() {
  16. const forkButton = document.querySelector('#fork-button');
  17. if (forkButton) {
  18. forkButton.childNodes.forEach(node => {
  19. if (node.nodeType === 3 && node.nodeValue.trim() === "Fork") {
  20. node.nodeValue = "Fork and Apply to YC";
  21. }
  22. });
  23. }
  24. }
  25.  
  26. // Run initially and also on page changes
  27. modifyForkButton();
  28. document.addEventListener('pjax:end', modifyForkButton); // For GitHub's dynamic content loading
  29. })();

QingJ © 2025

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