PageSourceSearch

https://retailawards.ca/wp-content/plugins/cookie-banner//cookieBanner.js?ver=1.0

js retailawards.ca collected 2026-10-06 16:23:44 UTC 2,442 bytes, 84 lines download raw bytes

1function isTouchEnabled() {
2  return (
3    "ontouchstart" in window ||
4    navigator.maxTouchPoints > 0 ||
5    navigator.msMaxTouchPoints > 0
6  );
7}
8
9jQuery(document).ready(function ($) {
10  const url = document.URL;
11  const domain = new URL(url).hostname;
12  const setCookieApiRoute = `https://${domain}/wp-json/wp/v2/get-consent`;
13  const $ccButton = $("#cc-button");
14  const $ccBanner = $("#cc-banner");
15  const $ccSettings = $("#cc-settings");
16
17  const cookieConsent =
18    document.cookie
19      .split("; ")
20      .find((row) => row.startsWith("cookie_consent="))
21      ?.split("=")[1] ?? "false";
22
23      setTimeout(() => {
24        if (cookieConsent === 'false') {
25          $ccSettings.css("display", "none");
26          $ccBanner.css("display", "flex");
27          setTimeout(() => {
28            $ccBanner.toggleClass("cc-invisible");
29          }, 100);
30        }
31      }, 2500);
32
33      if ($ccSettings.hasClass("cc-active")) {
34        $ccSettings.css("display", "none");
35        $ccBanner.css("display", "flex");
36        setTimeout(() => {
37          $ccBanner.toggleClass("cc-invisible");
38          $ccSettings.toggleClass("cc-active");
39        }, 100);
40      }
41
42
43  if (isTouchEnabled()) {
44    $ccSettings.on("mouseleave", function () {
45      if ($ccSettings.hasClass("cc-active")) {
46        $ccSettings.removeClass("cc-active");
47      }
48    });
49    $ccSettings.on("click", function (event) {
50      if ($ccSettings.hasClass("cc-active")) {
51        $ccSettings.css("display", "none");
52        $ccBanner.css("display", "flex");
53        setTimeout(() => {
54          $ccBanner.toggleClass("cc-invisible");
55          $ccSettings.toggleClass("cc-active");
56        }, 100);
57      }
58      if (!$ccSettings.hasClass("cc-active")) {
59        $ccSettings.toggleClass("cc-active");
60      }
61    });
62  } else {
63    $ccSettings.hover(function (event) {
64      $ccSettings.toggleClass("cc-active");
65    });
66    $ccSettings.on("click", function (event) {
67      $ccSettings.css("display", "none");
68      $ccBanner.css("display", "flex");
69      setTimeout(() => {
70        $ccBanner.toggleClass("cc-invisible");
71      }, 100);
72    });
73  }
74  $ccButton.on("click", function () {
75    fetch(setCookieApiRoute)
76      .then((response) => response.json())
77      .then((json) => console.log(json));
78    $ccBanner.toggleClass("cc-invisible");
79    setTimeout(() => {
80      $ccBanner.css("display", "none");
81    }, 1000);
82    $ccSettings.css("display", "flex");
83  });
84});

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.