PageSourceSearch

https://cdnn.1prime.ru//js/libs/global.events.js

js 1prime.ru collected 2026-10-01 08:34:31 UTC 1,118 bytes, 29 lines download raw bytes

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.