Skip to content

Instantly share code, notes, and snippets.

@jbubriski
Created May 19, 2014 02:36
Show Gist options
  • Save jbubriski/eba4bbeecccd5e4fc0ec to your computer and use it in GitHub Desktop.
Save jbubriski/eba4bbeecccd5e4fc0ec to your computer and use it in GitHub Desktop.
Bookmarklets to make it easier to work with GitHub diffs in GitHub. To use them, add a new bookmark with "javascript: " and then the code below. Use when viewing commit or Pull Request diffs.
String.prototype.endsWith = function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
};
$('.meta').each(function(index, value) {
var path = $(value).data('path');
if(path.endsWith('.unity')
|| path.endsWith('.meta')
|| path.endsWith('.anim')
|| path.endsWith('.controller')
|| path.endsWith('.prefab')
|| path.endsWith('.asset')) {
$(value).parent().hide();
}
});
String.prototype.endsWith = function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
};
$('.meta').each(function(index, value) {
$(value).parent().show();
});
@jbubriski
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment