aboutsummaryrefslogtreecommitdiffstats
path: root/github-show-full-commit-message.js
diff options
context:
space:
mode:
Diffstat (limited to 'github-show-full-commit-message.js')
-rw-r--r--github-show-full-commit-message.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/github-show-full-commit-message.js b/github-show-full-commit-message.js
index ee8edab..54486b4 100644
--- a/github-show-full-commit-message.js
+++ b/github-show-full-commit-message.js
@@ -1,5 +1,12 @@
(function() {
if (window.location.href.indexOf('github.com') != -1) {
- $('.commit-message .hidden-text-expander .js-details-target').click();
+ var $hidden_text_expander = $('.commit-message .hidden-text-expander .js-details-target');
+
+ if ($('.commit.open').length > 0) {
+ $('.commit').removeClass('open');
+ }
+ else {
+ $hidden_text_expander.click();
+ }
}
})(); \ No newline at end of file