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,16 @@ 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+ return false ;
97+ }
98+
99+
90100$ ( function ( ) {
91101 element = document . documentElement ;
92102 drawingArea = document . getElementsByTagName ( '#area' ) [ 0 ] ;
You can’t perform that action at this time.
0 commit comments