PageSourceSearch

https://www.fietsgoed.nl/modules/lvetopcontent/lvetopcontent.js

js fietsgoed.nl collected 2026-10-08 21:33:28 UTC 2,499 bytes, 65 lines download raw bytes

1let lvetopcontent = {};
2
3function setcookie (name, value)
4{
5    var expire = new Date();
6    expire.setMonth(expire.getMonth() + 1);
7    document.cookie = name + "=" + escape(value) + "; path=/; expires=" + expire.toGMTString();
8}
9
10function getcookie (name)
11{
12    let res = false;
13    if (typeof(document.cookie.split('; ').find(row => row.startsWith(name + "="))) != "undefined")
14    {
15        res = document.cookie.split('; ').find(row => row.startsWith(name + "=")).split('=')[1];
16    }
17    return res
18}
19
20function resetMessage (id, count)
21{
22    setcookie("lveTopContentMsg.id_msg", id);
23    setcookie("lveTopContentMsg.count", count);
24}
25$(document).ready(function ()
26{
27    if ($("#topcontentbannermodal").length > 0)
28    {
29        //it doesn't exist
30        fetch('/modules/lvetopcontent/content.json')
31            .then(response => response.json())    // one extra step
32            .then(data =>
33            {
34                lvetopcontent = data;
35                if (lvetopcontent.lve_show_popup)
36                {
37                    let messageId = parseInt(getcookie("lveTopContentMsg.id_msg"));
38                    if (!messageId)
39                    {
40                        messageId = lvetopcontent.lve_msg_id;
41                        resetMessage(lvetopcontent.lve_msg_id, 0);
42                    }
43                    let messageCount = parseInt(getcookie("lveTopContentMsg.count"));
44                    if ((messageId == lvetopcontent.lve_msg_id))
45                    {
46                        if (messageCount < lvetopcontent.lve_popup_show_times)
47                        {
48                            $('#top-content-banner-title').html(lvetopcontent.lve_popup_title);
49                            $('#top-content-banner-body').html(lvetopcontent.lve_popup_msg_html);
50                            $('#topcontentbannermodal').modal('show');
51                            resetMessage(lvetopcontent.lve_msg_id, messageCount + 1);
52                        }
53                    } else
54                    {
55                        $('#top-content-banner-title').html(lvetopcontent.lve_popup_title);
56                        $('#top-content-banner-body').html(lvetopcontent.lve_popup_msg_html);
57                        $('#topcontentbannermodal').modal('show');
58                        resetMessage(lvetopcontent.lve_msg_id, 1);
59                    }
60                }
61                // console.log(lvetopcontent);
62            })
63            .catch(error => console.error(error));
64    }
65})

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.