Default to All Branches Page (GitHub)

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

当前为 2015-12-23 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Default to All Branches Page (GitHub)
  3. // @namespace chriskim06
  4. // @description Changes the link so that clicking branches takes you to the all branches page
  5. // @include https://github.com/*
  6. // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
  7. // @version 1.4.5
  8. // @grant none
  9. // @locale en
  10. // ==/UserScript==
  11.  
  12. this.$ = this.jQuery = jQuery.noConflict(true);
  13.  
  14. $(function() {
  15. function allBranches() {
  16. if ($('.repository-content').length) {
  17. var link = $('.repository-content').find('ul.numbers-summary').find('li:nth-child(2) > a');
  18. link.attr('href', link.attr('href') + '/all');
  19. }
  20. }
  21. allBranches();
  22. window.$(document).on('pjax:end', function() {
  23. allBranches();
  24. });
  25. });

QingJ © 2025

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