Skip to content

Commit b508dcc

Browse files
committed
✨ Added support for commits from PR's (Github Commit Whitespace)
1 parent b835a64 commit b508dcc

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

Github_Commit_Whitespace/Github_Commit_Whitespace.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
1414
// @icon https://github.com/fluidicon.png
1515
// @include https://github.com/*
16-
// @version 1.4.4
16+
// @version 1.5.0
1717
// @grant none
1818
// ==/UserScript==
1919
/* global unsafeWindow */
@@ -49,7 +49,7 @@
4949
g.appendChild(a);
5050

5151
b.parentNode.insertBefore(g, b);
52-
} else if (/\/pull\/\d*\/files/.test(location.href) && (e = document.querySelector("#files_bucket .pr-toolbar .diffbar > .float-right"))) {
52+
} else if (/\/pull\/\d*\/(files|commits)/.test(location.href) && (e = document.querySelector("#files_bucket .pr-toolbar .diffbar > .float-right"))) {
5353

5454
var r = e.querySelector(".GithubCommitWhitespaceButton");
5555
if (r) {

Github_Commit_Whitespace/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ This works on commits, pull requests and compare pages.
2727

2828
## Version History
2929

30+
* **1.5.0**
31+
32+
* :sparkles: Added support for commits from PR's
33+
3034
* **1.4.4**
3135

3236
* :clapper: New version of GitHub Commit Whitespace
@@ -73,8 +77,12 @@ This works on commits, pull requests and compare pages.
7377
Use cases:
7478

7579
* <https://github.com/OpenUserJs/OpenUserJS.org/commit/aac291b83a5d5fa4fb4382080473ef3a4dd908c2> (commit)
76-
* <https://github.com/OpenUserJs/OpenUserJS.org/commit/aac291b83a5d5fa4fb4382080473ef3a4dd908c2> (commit)
77-
* <https://github.com/OpenUserJs/OpenUserJS.org/pull/327/files> (pr)
80+
81+
* <https://github.com/OpenUserJs/OpenUserJS.org/pull/327/files> (PR)
82+
83+
* <https://github.com/OpenUserJs/OpenUserJS.org/pull/327/commits/aac291b83a5d5fa4fb4382080473ef3a4dd908c2>
84+
(PR commit)
85+
7886
* <https://github.com/OpenUserJs/OpenUserJS.org/compare/master%40%7B1day%7D...master> (compare)
7987

8088
## External links

0 commit comments

Comments
 (0)