PageSourceSearch

https://www.facom.com/modules/custom/review_ratings/js/rr.js?tm4590

js facom.com collected 2026-10-02 10:55:55 UTC 1,786 bytes, 63 lines download raw bytes

1(function ($, Drupal, drupalSettings) {
2
3  Drupal.behaviors.rr = {
4    attach: function (context, settings) {
5      // Onetrust cookie.
6      var consentCookie = Cookies.get("OptanonConsent");
7      var OptanonAlertBoxClosed = Cookies.get("OptanonAlertBoxClosed");
8
9      // Check rr provider.
10      if (drupalSettings.rr_provider == 'bv') {
11
12        // Check if user consent cookie is set.
13        if (consentCookie !== undefined) {
14          if (OptanonAlertBoxClosed !== undefined) {
15            // Initiate TD cookies on every page load.
16            // Get cookie consent values.
17            var perCookieArr = [];
18
19            consentCookieArr = consentCookie.split('&');
20            $.each(consentCookieArr, (index, item) => {
21              itemArr = item.split('=');
22              if (itemArr[0] == 'groups') {
23                itemCatArr = itemArr[1].split(',');
24
25                // Performance cookie.
26                if (itemCatArr[1] !== undefined) {
27                  perCookieArr = itemCatArr[1].split(':');
28                }
29
30                if (perCookieArr[0] == 2 && perCookieArr[1] == 0) {
31                  // Remove BV cookies.
32                  removeBvCookies();
33                }
34              }
35            });
36          }
37          else {
38            // Remove BV cookies.
39            removeBvCookies();
40          }
41        }
42        else {
43          // Remove BV cookies.
44          removeBvCookies();
45        }
46      }
47
48      function removeBvCookies() {
49        // Set consent in BV.
50        window.BV.cookieConsent.setConsent({
51          BVBRANDID: false,
52          BVBRANDSID: false
53        });
54
55        // Remove BV cookies.
56        Cookies.remove('BVBRANDID');
57        Cookies.remove('BVBRANDSID');
58      }
59
60    }
61  };
62
63})(jQuery, Drupal, drupalSettings);

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.