Greasy Fork is available in English.

GitHub - Find active Forks button

Adds a button to find active Forks

  1. // ==UserScript==
  2. // @namespace https://greatest.deepsurf.us/users/297963
  3. // @name GitHub - Find active Forks button
  4. // @author Celuni
  5. // @description Adds a button to find active Forks
  6. // @version 1.0.1
  7. // @match *://github.com/*/*
  8. // @grant none
  9. // @run-at document-idle
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. try {
  16. let ulActions = document.querySelectorAll('div.application-main ul.pagehead-actions')[0];
  17. if (ulActions !== undefined) {
  18. let findFork = document.location.pathname.substr(1).split('/');
  19. findFork = 'https://techgaun.github.io/active-forks/index.html#' + findFork[0] + '/' + findFork[1];
  20. ulActions.innerHTML = ulActions.innerHTML + `
  21. <li>
  22. <a href="${findFork}" target="_blank">
  23. <button class="btn btn-sm btn-with-count" id="findActiveForks">
  24. <svg class="octicon octicon-repo-forked v-align-text-bottom" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true">
  25. <path fill-rule="evenodd" d="M8 1a1.993 1.993 0 00-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 002 1a1.993 1.993 0 00-1 3.72V6.5l3 3v1.78A1.993 1.993 0 005 15a1.993 1.993 0 001-3.72V9.5l3-3V4.72A1.993 1.993 0 008 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/>
  26. </svg>
  27. Find active Forks
  28. </button>
  29. </a>
  30. </li>`;
  31. }
  32. } catch (e) {
  33. console.log(e);
  34. }
  35. })();