PageSourceSearch

https://www.vituity.com/scripts/cookie-scripts.js

js vituity.com collected 2026-10-02 05:53:31 UTC 1,435 bytes, 49 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function () {
2    /*
3    / FUNCTION DECLARATIONS
4    */
5
6    function createCookie(cname, cvalue, exdays) {
7        var d = new Date();
8        d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
9        var expires = "expires=" + d.toUTCString();
10        document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
11    }
12
13    function getCookie(cname) {
14        var name = cname + "=";
15        var ca = document.cookie.split(';');
16        for (var i = 0; i < ca.length; i++) {
17            var c = ca[i];
18            while (c.charAt(0) == ' ') {
19                c = c.substring(1);
20            }
21            if (c.indexOf(name) == 0) {
22                return c.substring(name.length, c.length);
23            }
24        }
25        return "";
26    }
27
28    /*
29    / CLICK EVENTS
30    */
31    $('.close-cookie-agreement').on('click', function (e) {
32        e.preventDefault();
33        $('.cookie-container').fadeOut('fast');
34    });
35    $('.accept-cookie-agreement').on('click', function (e) {
36        e.preventDefault();
37        createCookie("v_accept", true, 365);
38        $('.cookie-container').fadeOut('fast');
39        // $('.close-cookie-agreement').trigger('click');
40    });
41    
42    var v = getCookie("v_accept");
43    if (!v) {
44        $('.cookie-container').show();
45    }
46    else {
47        $('.cookie-container').hide();
48    }
49});

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.