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