Browse files

Automatically suprress VCR cassettes in diffs

  • Loading branch information...
1 parent ad011e2 commit 51bb3d4afd10b55103b35e0c5b74504f67a293fa @sj26 committed Jun 13, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 .js/github.com.coffee
View
9 .js/github.com.coffee
@@ -25,8 +25,13 @@ if slashcount >= 5 # we are in a repo
.prependTo($('body'))
.fadeIn("slow")
-$('body.page-pullrequest, body.page-commit-show').delegate '.diff-view .file .meta .info', 'click', (e) ->
- $(e.target).parents('.file').first().find('.data').toggle()
+jQuery ($) ->
+ $('body.page-pullrequest, body.page-commit-show')
+ # Suppress VCR cassettes
+ .find('.diff-view .file:has(.meta[data-path^="spec/fixtures/cassettes"]) .data').addClass('suppressed').end()
+ # Make file suppression toggleable
+ .delegate '.diff-view .file .meta .info', 'click', (e) ->
+ $(e.target).parents('.file').first().find('.data').toggleClass('suppressed')
# credit https://twitter.com/#!/tcurdt/status/86193273055612929
# nabbed from https://github.com/freelancing-god/.js/blob/master/github.com.js

0 comments on commit 51bb3d4

Please sign in to comment.