Default to All Branches Page (GitHub)

Changes the link so that clicking branches takes you to the all branches page

  1. // ==UserScript==
  2. // @name Default to All Branches Page (GitHub)
  3. // @namespace https://github.com/chriskim06/userscripts
  4. // @description Changes the link so that clicking branches takes you to the all branches page
  5. // @match https://github.com/*/*
  6. // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
  7. // @require https://greatest.deepsurf.us/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=19641
  8. // @version 1.5.0
  9. // ==/UserScript==
  10.  
  11. this.$ = this.jQuery = jQuery.noConflict(true);
  12.  
  13. $(function() {
  14.  
  15. waitForKeyElements('.repository-content ul.numbers-summary > li:nth-child(2) > a', function(jNode) {
  16. var href = jNode.attr('href');
  17. if (!href.endsWith('/all')) {
  18. jNode.attr('href', href + '/all');
  19. }
  20. });
  21.  
  22. });
  23.