PageSourceSearch

https://www.tynaarlo.nl/modules/custom/tynaarlo_custom/js/linkedin.js?tlx3bu

js tynaarlo.nl collected 2026-10-02 08:22:26 UTC 2,538 bytes, 113 lines download raw bytes

1(function (window, document) {
2  var consentAppIds = ['linkedin'];
3  var partnerId = '6455618';
4  var hasLoaded = false;
5  var hasSubscribed = false;
6
7  function parseKlaroCookie() {
8    var cookieMatch = document.cookie.match(/(?:^|; )klaro=([^;]+)/);
9
10    if (!cookieMatch || !cookieMatch[1]) {
11      return null;
12    }
13
14    try {
15      return JSON.parse(decodeURIComponent(cookieMatch[1]));
16    }
17    catch (e) {
18      return null;
19    }
20  }
21
22  function hasCookieConsent(appId) {
23    var klaroCookie = parseKlaroCookie();
24
25    if (!klaroCookie || !klaroCookie.consents) {
26      return false;
27    }
28
29    return klaroCookie.consents[appId] === true;
30  }
31
32  function loadInsight() {
33    if (hasLoaded) {
34      return;
35    }
36    hasLoaded = true;
37
38    window._linkedin_partner_id = partnerId;
39    window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
40    window._linkedin_data_partner_ids.push(window._linkedin_partner_id);
41
42    if (!window.lintrk) {
43      window.lintrk = function (a, b) {
44        window.lintrk.q.push([a, b]);
45      };
46      window.lintrk.q = [];
47    }
48
49    var liScript = document.createElement('script');
50    liScript.type = 'text/javascript';
51    liScript.async = true;
52    liScript.src = 'https://snap.licdn.com/li.lms-analytics/insight.min.js';
53
54    var head = document.getElementsByTagName('head')[0] || document.documentElement;
55    head.appendChild(liScript);
56  }
57
58  function getManager() {
59    if (!window.klaro || typeof window.klaro.getManager !== 'function') {
60      return null;
61    }
62    try {
63      return window.klaro.getManager();
64    }
65    catch (e) {
66      return null;
67    }
68  }
69
70  function hasConsent() {
71    return consentAppIds.some(function (appId) {
72      return hasCookieConsent(appId);
73    });
74  }
75
76  function subscribe(manager) {
77    if (hasSubscribed || !manager || typeof manager.watch !== 'function') {
78      return;
79    }
80    hasSubscribed = true;
81    manager.watch({
82      update: function (mgr, event) {
83        if (hasConsent()) {
84          loadInsight();
85        }
86      },
87    });
88  }
89
90  function tryInit() {
91    var manager = getManager();
92    if (!manager) {
93      return false;
94    }
95    if (hasConsent()) {
96      loadInsight();
97    }
98    subscribe(manager);
99    return true;
100  }
101
102  if (!tryInit()) {
103    var interval = setInterval(function () {
104      if (tryInit()) {
105        clearInterval(interval);
106      }
107    }, 500);
108  }
109
110  if (document.readyState === 'loading') {
111    document.addEventListener('DOMContentLoaded', tryInit);
112  }
113})(window, document);

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.