PageSourceSearch

https://www.lode.by/local/templates/travelsoft/js/lode_utm_storage.js?17761529562211

js lode.by collected 2026-10-03 21:21:04 UTC 2,211 bytes, 68 lines download raw bytes

1(function () {
2    var KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term', 'utm_id'];
3    var STORAGE = 'lode_utm';
4    function run() {
5        try {
6            if (typeof window === 'undefined' || !window.location || !window.location.search) {
7                return;
8            }
9            var sp = window.location.search;
10            if (sp.length < 4) {
11                return;
12            }
13            var params = new URLSearchParams(sp);
14            var hit = false;
15            for (var i = 0; i < KEYS.length; i++) {
16                var t = params.get(KEYS[i]);
17                if (t && String(t).trim() !== '') {
18                    hit = true;
19                    break;
20                }
21            }
22            if (!hit) {
23                return;
24            }
25            var prev = {};
26            try {
27                if (typeof sessionStorage !== 'undefined') {
28                    var raw = sessionStorage.getItem(STORAGE);
29                    if (raw) {
30                        var parsed = JSON.parse(raw);
31                        if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
32                            prev = parsed;
33                        }
34                    }
35                }
36            } catch (e0) {
37                prev = {};
38            }
39            for (var j = 0; j < KEYS.length; j++) {
40                var key = KEYS[j];
41                var val = params.get(key);
42                if (val == null) {
43                    continue;
44                }
45                val = String(val).trim();
46                if (val === '') {
47                    continue;
48                }
49                if (val.length > 512) {
50                    val = val.slice(0, 512);
51                }
52                prev[key] = val;
53            }
54            if (typeof sessionStorage !== 'undefined') {
55                sessionStorage.setItem(STORAGE, JSON.stringify(prev));
56            }
57        } catch (e) {
58        }
59    }
60    if (typeof document === 'undefined') {
61        return;
62    }
63    if (document.readyState === 'loading') {
64        document.addEventListener('DOMContentLoaded', run);
65    } else {
66        run();
67    }
68})();

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.