File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ var socket = io(document.location.hostname);
3636socket . on ( 'github' , function ( data ) {
3737 $ ( '.online-users-count' ) . html ( data . connected_users ) ;
3838 data . data . forEach ( function ( event ) {
39- if ( ! isEventInQueue ( event ) ) {
39+ if ( ! isEventInQueue ( event ) || shouldEventBeIgnored ( event ) ) {
4040 eventQueue . push ( event ) ;
4141 }
4242 } ) ;
@@ -87,6 +87,20 @@ function isEventInQueue(event){
8787 return false ;
8888}
8989
90+ /**
91+ * This function adds a filter for events that we don't want to hear.
92+ *
93+ * To extend this function, simply add return true for events that should be filtered.
94+ */
95+ function shouldEventBeIgnored ( event ) {
96+ // This adds an easter egg to only play closed PRs
97+ if ( ! ! ULTIMATE_DREAM_KILLER )
98+ return ( event . type !== "PullRequestEvent" || event . action !== "closed" ) ;
99+
100+ return false ;
101+ }
102+
103+
90104$ ( function ( ) {
91105 element = document . documentElement ;
92106 drawingArea = document . getElementsByTagName ( '#area' ) [ 0 ] ;
You can’t perform that action at this time.
0 commit comments