PageSourceSearch

https://www.nsmu.ru/newsite/cookies.js

js nsmu.ru collected 2026-09-24 18:57:56 UTC 2,119 bytes, 46 lines download raw bytes

1(function($) {
2    function getCookie(name) {
3        var matches = document.cookie.match(new RegExp(
4            "(?:^|; )" + name.replace(/([\.$?*|{}$$$$$$$$\\\/\+^])/g, '\\$1') + "=([^;]*)"
5        ));
6        return matches ? decodeURIComponent(matches[1]) : undefined;
7    }
8    
9    function setCookie(name, value, days) {
10        var expires = "";
11        if (days) {
12            var date = new Date();
13            date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
14            expires = "; expires=" + date.toUTCString();
15        }
16        document.cookie = name + "=" + (value || "") + expires + "; path=/";
17    }
18    
19    if (getCookie('cookieConsent') === 'true') {
20        return;
21    }
22    
23    var cookieNotificationHTML = 
24        '<div id="cookie-notification" class="alert alert-info" style="position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; margin: 0; border-radius: 0; padding: 20px; text-align: center; background-color: #004899; color: #fff; border: none; display: none;">' +
25            '<span style="display: inline-block; margin-right: 20px; max-width: 800px; text-align: left;">' +
26                'В работе этого сайта используются файлы cookie и средства сбора статистики (в т.ч., Яндекс.Метрика). ' +
27                'Оставаясь на сайте, вы выражаете свое согласие.' +
28            '</span>' +
29				'<button id="cookie-accept-btn" class="btn btn-light" style="background-color: #fff; color: #004899; font-weight: bold; padding: 8px 30px; border: none; margin-bottom: 1.5rem;">' +
30                'Хорошо' +
31            '</button>' +
32        '</div>';
33    
34    $(document).ready(function() {
35        $('body').append(cookieNotificationHTML);
36        $('#cookie-notification').fadeIn(500);
37        
38        $('#cookie-accept-btn').click(function() {
39            setCookie('cookieConsent', 'true', 365);
40            $('#cookie-notification').fadeOut(300, function() {
41                $(this).remove();
42            });
43        });
44    });
45    
46})(jQuery);

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.