Skip to content

A bookmarklet that allows you to collapse all diffs with one click on Gitlab commit and merge request pages.

License

Notifications You must be signed in to change notification settings

17cliu/gitlab-collapse-diffs-bookmarklet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gitlab Collapse Diffs Bookmarklet

A bookmarklet that allows you to collapse all diffs with one click on Gitlab commit and merge request pages.

Installation

On your browser's bookmark bar, create a new bookmark, name it something reasonable (like "collapse diffs"), and set the following as the bookmark location:

javascript:(function(){for(var e=document.querySelectorAll(".diff-toggle-caret.ic-chevron-down, .diff-toggle-caret.fa-caret-down"),c=0,l=e.length;c<l;c++)e[c].dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))})();

Now, you can click on the bookmark to collapse all diffs on a page with one click. It may take a few moments if you have a lot of diffs on the page.

Usage demo

That's it!

Tested on Gitlab 11.2.3. Source.

About

A bookmarklet that allows you to collapse all diffs with one click on Gitlab commit and merge request pages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published