PageSourceSearch

https://hulpdienstvoertuigenbenelux.nl/scripts/notification.js?v=1791112785102

js hulpdienstvoertuigenbenelux.nl collected 2026-10-09 22:05:56 UTC 4,187 bytes, 116 lines download raw bytes

1(function() {
2    var toastEl = null;
3    var pending = null;
4
5    function ensureToast() {
6        if (toastEl) return true;
7        if (!document.body) return false;
8
9        toastEl = document.getElementById('notification-toast');
10        if (!toastEl) {
11            toastEl = document.createElement('div');
12            toastEl.id = 'notification-toast';
13            toastEl.className = 'notification-toast message';
14            toastEl.innerHTML = '<i class="fas fa-check-circle"></i> <span></span>';
15            document.body.appendChild(toastEl);
16        }
17
18        if (!document.getElementById('notification-toast-style')) {
19            var style = document.createElement('style');
20            style.id = 'notification-toast-style';
21            style.textContent = [
22                '.notification-toast.message {',
23                '  position: fixed;',
24                '  bottom: 20px;',
25                '  right: 20px;',
26                '  padding: 16px 24px;',
27                '  border-radius: 12px;',
28                '  color: white;',
29                '  font-weight: 600;',
30                '  font-family: Nunito, sans-serif;',
31                '  opacity: 0;',
32                '  visibility: hidden;',
33                '  transform: translateY(20px);',
34                '  transition: all 0.4s ease;',
35                '  z-index: 10000;',
36                '  max-width: 350px;',
37                '  backdrop-filter: blur(10px);',
38                '  -webkit-backdrop-filter: blur(10px);',
39                '  pointer-events: none;',
40                '  display: flex;',
41                '  align-items: center;',
42                '  gap: 10px;',
43                '}',
44                '.notification-toast.message.show {',
45                '  opacity: 1;',
46                '  visibility: visible;',
47                '  transform: translateY(0);',
48                '}',
49                '.notification-toast.message.success {',
50                '  background: linear-gradient(135deg, rgba(76,175,80,0.95), rgba(56,142,60,0.95));',
51                '  border: 1px solid rgba(76,175,80,0.3);',
52                '}',
53                '.notification-toast.message.error {',
54                '  background: linear-gradient(135deg, rgba(244,67,54,0.95), rgba(211,47,47,0.95));',
55                '  border: 1px solid rgba(244,67,54,0.3);',
56                '}',
57                '.notification-toast.message i {',
58                '  font-size: 16px;',
59                '  flex-shrink: 0;',
60                '}'
61            ].join('\n');
62            document.head.appendChild(style);
63        }
64
65        if (pending) {
66            var m = pending;
67            pending = null;
68            showToast(m.text, m.type);
69        }
70        return true;
71    }
72
73    function showToast(text, type) {
74        if (!ensureToast()) {
75            pending = { text: text, type: type };
76            return;
77        }
78
79        type = type || 'success';
80        var icon = type === 'success' ? 'fa-check-circle' : 'fa-exclamation-circle';
81        toastEl.className = 'notification-toast message ' + type;
82
83        var iconEl = toastEl.querySelector('i');
84        if (iconEl) iconEl.className = 'fas ' + icon;
85
86        var span = toastEl.querySelector('span');
87        if (span) span.textContent = text;
88
89        toastEl.classList.add('show');
90
91        clearTimeout(toastEl._timeout);
92        toastEl._timeout = setTimeout(function() {
93            toastEl.classList.remove('show');
94        }, 4000);
95    }
96
97    window.showMessage = function(arg1, arg2, arg3) {
98        if (arg1 && typeof arg1 === 'object' && arg1.nodeType === 1) {
99            var el = arg1;
100            var type = arg3 ? 'error' : ((el.id || '').indexOf('error') !== -1 ? 'error' : 'success');
101            var hidden = document.querySelectorAll('.message.show');
102            for (var i = 0; i < hidden.length; i++) hidden[i].classList.remove('show');
103            showToast(arg2 || '', type);
104            return;
105        }
106        showToast(arg1, arg2);
107    };
108
109    if (document.readyState === 'loading') {
110        document.addEventListener('DOMContentLoaded', function() {
111            ensureToast();
112        });
113    } else {
114        ensureToast();
115    }
116})();

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.