PageSourceSearch

https://www.incotex.ru/bitrix/js/ggrachdev.debugbar/DebugBar.js?16656467452891

js incotex.ru collected 2026-09-29 16:30:44 UTC 2,891 bytes, 78 lines download raw bytes

1Ggrach.DebugBar = {
2
3    initHotKeys: function () {
4        // Закрываем панель при нажатии на esc
5        window.addEventListener('keydown', Ggrach.Handlers.onKeyEsc, true);
6    },
7
8    hasDebugBar: function () {
9        return document.querySelector('.ggrach__debug-bar') !== null;
10    },
11
12    init: function () {
13
14        document.addEventListener('DOMContentLoaded', function () {
15            if (Ggrach.Utils.User.isAdmin() && Ggrach.DebugBar.hasDebugBar())
16            {
17                if (Ggrach.Utils.Screen.isMobile())
18                {
19                    Ggrach.DebugBar.removeBar();
20                } else
21                {
22                    Ggrach.DebugBar.initHotKeys();
23
24                    // Закрываем панель при нажатии на область затемнения
25                    Ggrach.Utils.DOM.getOverlay().addEventListener('click', function () {
26                        document.querySelector('[data-type-notice].active').click();
27                    });
28
29                    if (Ggrach.Utils.DOM.getButtonsNotice())
30                    {
31                        Ggrach.Utils.DOM.getButtonsNotice().forEach(function (element) {
32                            element.addEventListener('click', Ggrach.Handlers.onClickItemNotice);
33                        });
34                    }
35                    
36                    document.querySelector('[data-click="toggle_debug_bar"]').addEventListener('click', function (e) {
37                        e.preventDefault();
38                        Ggrach.DebugBar.toggle();
39                    });
40                }
41            }
42        });
43    },
44
45    removeBar: function () {
46        this.getDebugBar().remove();
47    },
48
49    getDebugBar: function () {
50        return document.querySelector('.ggrach__debug-bar');
51    },
52
53    toggle: function () {
54        if(this.getDebugBar().classList.contains('hide-debug-bar'))
55        {
56            document.querySelector('.ggrach__debug-bar__right__item_close').innerHTML = '×';
57            BX.setCookie('ggrach_debug_bar_is_close', 'false', {expires: (60 * 60 * 2), path: '/'});
58        }
59        else
60        {
61            document.querySelector('.ggrach__debug-bar__right__item_close').innerHTML = '<';
62            Ggrach.Utils.DOM.hideAllScreenLogs();
63            BX.setCookie('ggrach_debug_bar_is_close', 'true', {expires: (60 * 60 * 2), path: '/'});
64        }
65        
66        this.getDebugBar().classList.toggle('hide-debug-bar');
67    },
68
69    hide: function () {
70        this.getDebugBar().classList.add('hide-debug-bar');
71        BX.setCookie('ggrach_debug_bar_is_close', 'true', {expires: (60 * 60 * 2), path: '/'});
72    },
73
74    show: function () {
75        this.getDebugBar().classList.remove('hide-debug-bar');
76        BX.setCookie('ggrach_debug_bar_is_close', 'false', {expires: (60 * 60 * 2), path: '/'});
77    }
78};

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.