Skip to content

Instantly share code, notes, and snippets.

@markreid
Created October 6, 2014 01:36
Show Gist options
  • Save markreid/d6031a79a3a91e9fa2bf to your computer and use it in GitHub Desktop.
Save markreid/d6031a79a3a91e9fa2bf to your computer and use it in GitHub Desktop.
github diffs - add a 'hide' button to each file
$('#files .meta .actions').append('<button class="btn-hide minibutton tooltipped tooltipped-n" aria-label="Hide this file">Hide</button>');
$('#files .meta .actions .btn-hide').on('click', function(){
$(this).toggleClass('selected').closest('div.file').find('.data').toggleClass('hidden');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment