PageSourceSearch

https://rahvaloendus.ee/sites/default/files/eu_cookie_compliance/eu_cookie_compliance.script.js?0

js rahvaloendus.ee collected 2026-09-24 23:48:26 UTC 1,151 bytes, 31 lines download raw bytes

1function createSnippet(scriptToLoad) {
2  const {src, attachName} = scriptToLoad;
3  const tag = document.createElement('script');
4  tag.src = decodeURI(src);
5  if (attachName) {
6    const intervalId = setInterval(() => {
7      if (Drupal.behaviors[attachName]) {
8        Drupal.behaviors[attachName].attach(document, drupalSettings);
9        clearInterval(intervalId);
10      }
11    }, 100);
12  }
13  document.body.appendChild(tag);
14}
15window.euCookieComplianceLoadScripts = function(category) {
16  const unverifiedScripts = drupalSettings.eu_cookie_compliance.unverified_scripts;
17  const scriptList = [{"src":"/themes/stat/js/recommy.js"},{"src":"/modules/contrib/google_tag/js/gtm.js"},{"src":"/modules/contrib/google_tag/js/gtag.js"}];
18
19  scriptList.forEach(scriptToLoad => {
20    const {src, categoryName} = scriptToLoad;
21    if (!unverifiedScripts.includes(src)) {
22      if (!category && !categoryName) {
23        // Load scripts without any categories specified.
24        createSnippet(scriptToLoad);
25      } else if (categoryName === category) {
26        // Load scripts for the specific category.
27        createSnippet(scriptToLoad);
28      }
29    }
30  });
31}

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.