Skip to content

Commit

Permalink
fix selector following GitHub page change (#4)
Browse files Browse the repository at this point in the history
GitHub updated their PR page, as a result the selector must be updated to reflect the new page layout.
  • Loading branch information
sfriquet authored and jverkoey committed Sep 9, 2019
1 parent fabd2f6 commit 64b8fcc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@
if (document.location.href.indexOf('/pull/') === -1) {
return;
}
var squashContainer = document.getElementsByClassName('btn-group-squash')[0];
if (!squashContainer) {
return;
}
var squashButton = squashContainer.querySelector('button[data-details-container=".js-merge-pr"]');


var squashButton = document.querySelector('button.btn-group-squash[data-details-container=".js-merge-pr"]')
if (squashButton.getAttribute('squashmerge')) {
return;
}
Expand Down

0 comments on commit 64b8fcc

Please sign in to comment.