Skip to content

Instantly share code, notes, and snippets.

View csham's full-sized avatar

Chris Sham csham

View GitHub Profile
@csham
csham / Bookmarket-CompareCommits.js
Last active April 7, 2016 20:51
For github.com, adds compare buttons next to commits on pull request page so you can easily compare between two commits. Just run contents through a bookmarklet tool like http://chriszarate.github.io/bookmarkleter/ and save as bookmark.
(function() {
var comparisonList = [];
var onCompareButtonClick = function() {
var $button = $(this);
if ($button.hasClass("btn-outline")) {
$button.addClass("btn-primary")
.removeClass("btn-outline");
var sha = $button.data("sha");
@csham
csham / show-hidden-comments.js
Last active April 22, 2020 04:46
Show all hidden comments on github's pull request page.
var showHiddenCommentsButtons = document.getElementsByClassName('discussion-item-toggle-closed');
for (var i=0; i < showHiddenCommentsButtons.length; i++) {
showHiddenCommentsButtons[i].click();
}