1var wsCO = null; 2var wsCOpubSub = { 3 subscribers: [], 4 subscriber(action) { 5 this.subscribers.push(action) 6 }, 7 publish(){ 8 this.subscribers.forEach((_, index) => this.subscribers[index](wsCO)) 9 } 10} 11$(function(){ 12 var socketConfigurationEnabled = coWsConfig && coWsConfig.enable && coWsConfig.serverUrl && coWsConfig.pingNorificationUrl, 13 userConnected = Boolean(userId) 14 if(socketConfigurationEnabled && userConnected){ 15 wsCO = io(coWsConfig.serverUrl, { 16 query:{ 17 userId: userId 18 } 19 }) 20 21 wsCOpubSub.publish(); 22 23 wsCO.on('new-notification', function(){ 24 getAjaxNotification("", "refresh", "citoyens", userId, true) 25 }) 26 } 27})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.