diff options
| author | Teddy Wing | 2014-03-26 20:37:25 -0400 |
|---|---|---|
| committer | Teddy Wing | 2014-03-26 20:37:25 -0400 |
| commit | 38e96dbdaf6b57bb8e193a164697b8b93aa916f6 (patch) | |
| tree | c02255dc1bcfac7f4ef002d9c71858f2b7d8c76d | |
| parent | cc6387d5e21af1d77c9adfc377c236a837b38add (diff) | |
| download | GitHub-Show-Full-Commit-Message-Bookmarklet-38e96dbdaf6b57bb8e193a164697b8b93aa916f6.tar.bz2 | |
Bookmarklet now toggles between expanded & collapsed
| -rw-r--r-- | github-show-full-commit-message.js | 9 |
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 |
