Show Full Commit Message and Default to All Branches Page (GitHub)

Automatically show the full commit and changes the link so that clicking branches takes you to the all branches page

Fra 23.12.2015. Se den seneste versjonen.

  1. // ==UserScript==
  2. // @name Show Full Commit Message and Default to All Branches Page (GitHub)
  3. // @namespace chriskim06
  4. // @description Automatically show the full commit and 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.2
  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. function fullCommit() {
  22. if ($('commit-tease.js-details-container').length) {
  23. $('commit-tease.js-details-container').addClass('open');
  24. }
  25. }
  26. allBranches();
  27. fullCommit();
  28. window.$(document).on('pjax:end', function() {
  29. allBranches();
  30. fullCommit();
  31. });
  32. });