PageSourceSearch

https://www.gool.co.il/Scripts/AcceptCookies/AcceptCookies.js

js gool.co.il collected 2026-10-05 20:15:13 UTC 3,577 bytes, 97 lines download raw bytes

1(function ($) {
2
3    $.$AcceptCookies = function () {
4
5       
6        var settings = {};
7
8        var HasAccepted;         
9        
10   
11        // start Declare functions
12        function _Init() {
13
14            /*==================================================*/
15            /*== Update local variables from initial settings ==*/
16            /*==================================================*/
17
18            /// Merge the default settings with the current settings
19
20          
21            HasAccepted = readCookie("acceptCookieAccepMessage");// settings.HasAccepted;
22
23          
24           
25            if (!HasAccepted) {
26                ShowCookieAcceptMessage(); // Create Closed EMPTY container
27            }
28            
29
30
31            function ShowCookieAcceptMessage() {
32               
33
34                //$('body').append("<div class='ShowCookieAcceptMessage'><div class='CookieAccepMessage'>בעת השימוש באתר אנו עושים שימוש ב”עוגיות” (cookies) כמפורט <a href='/Home/privacy'>במדיניות הפרטיות</a>. בעצם גלישתך באתר הינך מאשר את השימוש בעוגיות.</div><div class='CookieAccepMessageBtn'>הבנתי</div></div>")
35                $('.cookies-box').css("display", "flex");
36                $(".cookies-box a").on("click", function () {
37                    createCookie("acceptCookieAccepMessage", true, 365);
38                    $(".cookies-box").remove();
39                });
40
41            }
42
43           
44
45            function createCookie(name, value, days) {
46                if (days) {
47                    var date = new Date();
48                    date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
49                    var expires = "; expires=" + date.toUTCString();
50                }
51                else var expires = "";
52                document.cookie = name + "=" + value + expires + "; path=/";
53            }
54
55            function readCookie(name) {
56                var nameEQ = name + "=";
57                var ca = document.cookie.split(';');
58                for (var i = 0; i < ca.length; i++) {
59                    var c = ca[i];
60                    while (c.charAt(0) == ' ') c = c.substring(1, c.length);
61                    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
62                }
63                return null;
64            }
65
66
67        }
68        
69        _Init(); // initialize
70    };
71
72    // add the plugin to the jQuery.fn object
73    $.fn.$AcceptCookies = function (options) {
74        // iterate through the DOM elements we are attaching the plugin to
75        return this.each(function () {
76
77            // if plugin has not already been attached to the element
78            if (undefined == $(this).data('$AcceptCookies')) {
79
80                // create a new instance of the plugin
81                // pass the DOM element and the user-provided options as arguments
82                var plugin = new $.$AcceptCookies(this, options);
83
84                // in the jQuery version of the element
85                // store a reference to the plugin object
86                // you can later access the plugin and its methods and properties like
87                // element.data('pluginName').publicMethod(arg1, arg2, ... argn) or
88                // element.data('pluginName').settings.propertyName
89                $(this).data('$AcceptCookies', plugin);
90            }
91        });
92    }
93
94}(jQuery));
95
96
97$("body").$AcceptCookies();

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.