Last active
February 1, 2023 08:16
-
-
Save eegeeZA/bb0900a8d694341d874f2f702dc421e2 to your computer and use it in GitHub Desktop.
Add a button to minimize the contents of a file in Bitbucket pull requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
const fileHeading = $(".diff-container .heading").find(".aui-buttons:first"); | |
const minimizeButton = $("<button>").addClass('aui-button').text('Minimize'); | |
minimizeButton.click(function (element) { | |
const fileContents = $(element.target).closest('div.diff-container').find(".diff-content-container"); | |
fileContents.toggle(); | |
}); | |
fileHeading.append(minimizeButton); | |
})(); | |
// Bookmarklet => javascript:(function(){var b=$(".diff-container .heading").find(".aui-buttons:first"),a=$("<button>").addClass("aui-button").text("Minimize");a.click(function(a){$(a.target).closest("div.diff-container").find(".diff-content-container").toggle()});b.append(a)})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment