PageSourceSearch

https://www.bm-meyzieu.fr/typo3conf/ext/stratis_common/Resources/P…/stratis.tarteaucitron.services.js

js bm-meyzieu.fr collected 2026-10-02 12:28:07 UTC 4,729 bytes, 150 lines download raw bytes

1"use strict";
2
3if (tarteaucitron) {
4  var cookiesToObject = function cookiesToObject(cookies) {
5    return cookies
6        .split("!")
7        .filter(function (cookie) {
8          return cookie !== "";
9        })
10        .reduce(function (current, next) {
11          var nextSplit = next.split("="),
12              key = nextSplit[0],
13              value = nextSplit[1];
14          current[key] = value;
15          return current;
16        }, {});
17  };
18
19  var handleFancyboxServiceCookies = function handleFancyboxServiceCookies() {
20    var cookies = cookiesToObject(tarteaucitron.cookie.read());
21
22    if (
23        cookies.youtube === "false" ||
24        cookies.vimeo === "false" ||
25        cookies.dailymotion === "false"
26    ) {
27      tarteaucitron.cookie.create("fancybox", false);
28    }
29  };
30
31  tarteaucitron.services.fancybox = {
32    key: "fancybox",
33    type: "video",
34    name: "FancyboxService",
35    needConsent: true,
36    cookies: [],
37    js: function js() {},
38    fallback: function fallback() {
39      tarteaucitron.fallback(
40          ["js-fancybox-check-cookies"],
41          function (item) {
42            var id = item.href.match(/youtube|youtu|vimeo|dailymotion/gi);
43
44            if (id) {
45              if (id[0] === "youtu") {
46                id[0] = "youtube";
47              }
48
49              var service = id[0];
50              var cookies = cookiesToObject(tarteaucitron.cookie.read());
51
52              if (cookies[service] === "true") {
53                return item;
54              }
55
56              var itemToPaste = document.createElement("button");
57              var tempNode = document.createElement("div");
58              tempNode.innerHTML = tarteaucitron.engage(service);
59              var childNodes = tempNode.querySelector(".tac_float").childNodes;
60              var text = childNodes[0];
61              var button = childNodes[1];
62              itemToPaste.className = ""
63                  .concat(button.className, " ")
64                  .concat(item.className, " cookies-denied");
65              itemToPaste.id = button.id;
66              itemToPaste.innerHTML = "";
67              itemToPaste.appendChild(text);
68              itemToPaste.innerHTML = "<span>".concat(
69                  itemToPaste.innerHTML.trim(),
70                  "</span>"
71              );
72              itemToPaste.setAttribute("type", "button");
73              item.parentElement.replaceChild(itemToPaste, item);
74              itemToPaste.addEventListener("click", function (e) {
75                e.preventDefault();
76                location.reload();
77              });
78              var galleryList = itemToPaste.classList.contains("gallery-item")
79                  ? itemToPaste.parentElement.parentElement
80                  : itemToPaste.parentElement;
81              var haveLinks = galleryList.querySelector("a");
82              var hasBlockedElements = galleryList.querySelector("button");
83
84              if (!haveLinks) {
85                galleryList.classList.add("no-links");
86              }
87
88              if (hasBlockedElements) {
89                galleryList.classList.add("has-blocked-elements");
90              }
91
92              return itemToPaste;
93            }
94          },
95          true
96      );
97    }
98  };
99  tarteaucitron.reloadThePage = true;
100  tarteaucitron.events.load = handleFancyboxServiceCookies;
101  window.addEventListener("tac.root_available", function () {
102    var CTAButtons = [].slice.call(
103        document.querySelectorAll(".tarteaucitronCTAButton")
104    );
105    CTAButtons.forEach(function (button) {
106      button.addEventListener("click", function () {
107        location.reload();
108      });
109    });
110  });
111}
112
113window.addEventListener("tac.close_panel", handleFancyboxServiceCookies);
114setTimeout(function () {
115  var personalize = document.querySelector("#tarteaucitronPersonalize");
116
117  if (!personalize) {
118    return;
119  }
120
121  personalize.addEventListener("click", function () {
122    if (jQuery && jQuery.fancybox) {
123      jQuery.fancybox.close();
124    }
125  });
126}, 2000);
127
128if (tarteaucitron.job.length) {
129  var serviceAllowButtonsHandler = function serviceAllowButtonsHandler() {
130    var tacRoot = document.getElementById("tarteaucitronRoot");
131    var allowButtons = [].slice
132        .call(document.querySelectorAll(".tarteaucitronAllow:not(.has-listener)"))
133        .filter(function (item) {
134          return item && !tacRoot.contains(item);
135        });
136    allowButtons.forEach(function (button) {
137      button.classList.add("has-listener");
138      button.addEventListener("click", function () {
139        location.reload();
140      });
141    });
142  };
143
144  tarteaucitron.job.forEach(function (serviceName) {
145    document.addEventListener(
146        "".concat(serviceName, "_added"),
147        serviceAllowButtonsHandler
148    );
149  });
150}

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.