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
//This custom JS adds few missing features to Bitbucket's code review tool | |
//1) emoji buttons to Edit page to easily mark Pull Request | |
//2) 'No whitespaces' button is added next to 'Commits' and 'Activity' and reloads the page with whitespaces diff turned off. | |
//I'm not familiar with JS or jQuery, so this code is ugly and could be much better. But it works, so I have that going for me which is nice | |
//I used Chrome Extension to enable usage of this code: https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija?hl=en | |
//Reference to last focused text field | |
var lastFocused; | |
$("input[type='text']").focus(function() { | |
lastFocused = document.activeElement; |