PageSourceSearch

https://www.malle.be/Scripts/burgerprofiel.js

js malle.be collected 2026-09-24 19:49:49 UTC 3,071 bytes, 85 lines download raw bytes

1vl.widget.client.capture(function (widget) {
2    if (widget.getPluginTypeId() === 'global_header') {
3
4        widget.getExtension('citizen_profile.session').then(function (session) {
5            if (!burgerprofielUAC) { //hijack 
6                var bgbtn = $('.vlw__profile__toggle');
7                var html = bgbtn.parent().html();
8                bgbtn.remove();
9                $('.vlw__primary-bar__plugins__item > div ').append(html);
10                $(document).on('click', '.vlw__profile__toggle', function (e) {
11                    e.stopImmediatePropagation();
12                    e.stopPropagation();
13                    e.preventDefault();
14                    window.location.href = '/login';
15                });
16            }
17            var websiteHasAuthenticatedSession = burgerprofielUAC;
18            session.configure({
19                active: websiteHasAuthenticatedSession,
20                endpoints: {
21                    loginUrl: '/login',
22                    logoutUrl: '/logout',
23                    loginRedirectUrl: window.location.href
24                }
25            });
26
27            function activityEventHandler() {
28                session.extend();
29            }
30            var eventNames = [
31                'mousedown',
32                'mousemove',
33                'mousewheel',
34                'DOMMouseScroll',
35                'scroll',
36                'wheel',
37                'keydown',
38                'keypress',
39                'touchmove',
40                'touchstart'
41            ];
42
43            for (var i = 0; i < eventNames.length; i++) {
44
45                window.addEventListener(eventNames[i], activityEventHandler);
46            }
47        });
48        widget.on('citizen_profile.session.login.complete', function (logoutRequest) {
49            $('#my-profile-link').removeClass('hidden');
50            $('#my-profile-link').show();
51
52        });
53
54        widget.on('citizen_profile.session.logout.request', function (logoutRequest) {
55
56            logoutRequest.acknowledge();
57
58            switch (logoutRequest.getRequest().getReason()) {
59                case 'expired':
60                    fetch('https://prod.widgets.burgerprofiel.vlaanderen.be/api/v1/session/validate')
61                        .then(function (response) {
62                            if (response.status === 204) {
63                                logoutRequest.reject();
64                            }
65                            else {
66                                logoutRequest.accept();
67                            }
68                        })
69                        .catch(function () {
70                            logoutRequest.accept();
71                        });
72                    break;
73                case 'user':
74                case 'inactivity':
75                    logoutRequest.accept();
76                    break;
77
78                default:
79                    logoutRequest.reject();
80                    break;
81            }
82        });
83
84    }
85});

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.