1$(function () { 2 /* Ñоздание оÑложеннÑÑ Ð´ÐµÐ¹ÑÑвий */ 3 if (GLOBAL) { 4 GLOBAL.events = { 5 subscriptions: {}, 6 /* ÐбнÑлÑÐµÑ Ð²Ñе подпиÑки */ 7 reset: function () { 8 GLOBAL.events.subscriptions = {} 9 }, 10 /* ÐодпиÑÑÐ²Ð°ÐµÑ Ð½Ð° ÑобÑÑие */ 11 subscribe: function (message, callback) { 12 if (typeof GLOBAL.events.subscriptions[message] === 'undefined') { 13 GLOBAL.events.subscriptions[message] = []; 14 } 15 GLOBAL.events.subscriptions[message].push(callback); 16 }, 17 /* ÐÑполнÑÐµÑ ÑобÑÑие */ 18 trigger: function (message, params) { 19 if (typeof GLOBAL.events.subscriptions[message] === 'undefined') { 20 return; 21 } 22 var subscribers = GLOBAL.events.subscriptions[message]; 23 for (key in subscribers) { 24 subscribers[key](params); 25 } 26 } 27 } 28 } 29});
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.