PageSourceSearch

https://mogilevkino.by/uploads/images/PrefIcon/afp.js

js mogilevkino.by collected 2026-10-02 17:17:51 UTC 5,841 bytes, 172 lines download raw bytes

1(function (d, w) {
2    window.addEventListener('click', function(ev){
3        var href = '';
4
5        let d = ev.target.parentElement;
6
7        if (ev.target && ev.target.getAttribute('href') ) {
8            href = ev.target.getAttribute('href');
9        }
10        if (ev.target.parentElement && ev.target.parentElement.getAttribute('href') ) {
11            href = ev.target.parentElement.getAttribute('href');
12        }
13        if(href === '' && d.parentElement.getAttribute('href')){
14            href = d.parentElement.getAttribute('href');
15        }
16
17        if (href.indexOf('//saleframe.') + 1) {
18            let link = href;
19            if (href.includes('?')) {
20                link += '&v=2';
21            } else {
22                link += '?v=2';
23            }
24
25            ev.preventDefault();
26            ev.stopPropagation ? ev.stopPropagation() : (ev.cancelBubble=true);
27
28            if ( /Android|AppleWebKit|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && screen.width <= 960 && location.host != 'saleframe.24ats.com') {
29                redirectToMobile(link);
30            } else {
31                openAtsWidget(link);
32            }
33        }
34    });
35
36    window.addEventListener('message', function(msg) {
37        if (msg.data && msg.data.action) {
38            if (msg.data.action == 'closeFrame') {
39                closeWidget()
40            }
41        }
42        if (msg.data.url && (msg.data.url.match('://checkout.bepaid.by') || msg.data.url.match('://gateway.bepaid.by'))) {
43            setTimeout(function() {
44                try {
45                    document.querySelector('iframe.frame-center').src = msg.data.url;
46                } catch (err) {
47                    document.location = msg.data.url;
48                }
49            }, 500);
50        };
51        return false;
52    });
53
54    function closeWidget () {
55        var overlay = document.querySelector('.arcom__overlay'),
56            container = document.querySelector('.arcom__widget-container');
57
58        while (container.firstChild) {
59            container.removeChild(container.firstChild);
60        }
61        overlay.style.display = 'none';
62    }
63
64    function redirectToMobile (url) {
65        var overlay = document.querySelector('.arcom__overlay'),
66            container = document.querySelector('.arcom__widget-container'),
67            frame = document.createElement('iframe');
68
69        while (container.firstChild) {
70            container.removeChild(container.firstChild);
71        }
72
73        overlay.style.display = 'flex';
74
75        frame.setAttribute("src", url);
76        frame.style.width = "100%";
77        frame.style.height = "100%";
78        frame.style.border = "none";
79        frame.style.position = "absolute";
80        frame.style.top = "0";
81        frame.style.bottom = "0";
82        frame.style.right = "0";
83        frame.style.left = "0";
84        frame.style.zIndex = "100001";
85
86        container.appendChild(frame);
87    }
88
89    function findGetParameter (str, parameterName) {
90        var result = null,
91            tmp = [];
92        str.split('?')[1].split('&').forEach(function(item) {
93            tmp = item.split('=')
94            if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1])
95        })
96
97        return result
98    }
99
100    function openAtsWidget(e) {
101        for (var t = document.querySelector(".arcom__overlay"), a = document.querySelector(".arcom__widget-container"), o = document.createElement("iframe"); a.firstChild;) a.removeChild(a.firstChild);
102        t.style.display = "flex",
103        o.setAttribute("src", e), 
104        o.style.width = "1030px", 
105        o.style.height = "720px", 
106        o.style.border = "none", 
107
108        o.style.position = "absolute", 
109        o.style.top = "50%",
110        o.style.left = "50%",
111        o.style.transform = "translate(-50%, -50%)",
112        o.style.webkitTransform = "translate(-50%, -50%)",
113        
114        a.appendChild(o)
115    }
116
117    function addOverlay () {
118        console.log('LOAD OVERLEY');
119
120        var css = '@keyframes fadeIn {'+
121                '0% { opacity: 0 }' +
122                '100% { opacity: 1 }}',
123            head = document.head || document.getElementsByTagName('head')[0],
124            style = document.createElement('style'),
125            overlay = document.createElement('div'),
126            body = document.querySelector('body'),
127            container = document.createElement('div');
128
129        style.type = 'text/css';
130
131        container.className = 'arcom__widget-container'; 
132
133        // container.style = 'max-width: 1060px!important;' +
134        //     'margin: 0 auto!important;' +
135        //     'position: relative;' +
136        //     'top: 5vh;' +
137        //     'max-height: 90vh;' +
138        //     'width: 100%;' +
139        //     'background-color: linear-gradient(to bottom,rgba(0,0,0,.6) 0,rgba(0,0,0,.6) 100%);' +
140        //     'padding: 0;';
141
142        overlay.className = 'arcom__overlay';
143        overlay.style = 'margin: auto!important;' +
144            'background-color: rgba(0,0,0,.85)!important;' +
145            'display: none;' +
146            'position: fixed;' +
147            'top: 0;' +
148            'right: 0;' +
149            'bottom: 0;' +
150            'left: 0;' +
151            'padding: 0;' +
152            'overflow: auto;' +
153            'background-color: rgba(0,0,0,.85);' +
154            'animation-duration: .35s;' +
155            'animation-fill-mode: both;' +
156            'z-index: 10000;' +
157            'animation-name: fadeIn;';
158
159        if (style.styleSheet) {
160            // This is required for IE8 and below.
161            style.styleSheet.cssText = css;
162        } else {
163            style.appendChild(document.createTextNode(css));
164        }
165
166        head.appendChild(style);
167        overlay.appendChild(container);
168        body.appendChild(overlay);
169    }
170
171    addOverlay();
172})(document, window);

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.