Skip to content

Commit e69454f

Browse files
committed
Added to compare page;
1 parent 5893b89 commit e69454f

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Github_Commit_Whitespace/Github_Commit_Whitespace.user.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// @homepageURL https://github.com/jerone/UserScripts/tree/master/Github_Commit_Whitespace
99
// @downloadURL https://github.com/jerone/UserScripts/raw/master/Github_Commit_Whitespace/Github_Commit_Whitespace.user.js
1010
// @include https://github.com/*
11-
// @version 1
11+
// @version 1.1
1212
// @grant none
1313
// ==/UserScript==
1414

@@ -18,7 +18,8 @@
1818

1919
function addButton() {
2020
var e;
21-
if (!/\/commit\//.test(location.href) || !(e = document.querySelector(".explain"))) return;
21+
if (!(/\/commit\//.test(location.href) || /\/compare\//.test(location.href)) ||
22+
!(e = document.querySelector(".explain"))) return;
2223

2324
var r = e.querySelector(".GithubCommitWhitespaceButton");
2425
if (r) r.parentElement.removeChild(r);

Github_Commit_Whitespace/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Adds button to hide whitespaces from commit.
1919

2020
### Version History
2121

22-
<dl>
23-
<dt>1.0</dt>
24-
<dd>Initial version</dd>
25-
</dl>
22+
* 1.1
23+
* Added to compare page;
24+
* 1.0
25+
* Initial version;
2626

2727
### TODO
2828

0 commit comments

Comments
 (0)