Skip to content

Instantly share code, notes, and snippets.

@jbubriski
Created May 19, 2014 02:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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();
});
@codeimpossible
Copy link

this is the greatest gist in the history of the world.

@jbubriski
Copy link
Author

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