PageSourceSearch

https://www.reviewofoptometry.com/onetrust/OneTrust.js

js reviewofoptometry.com collected 2026-10-02 03:37:07 UTC 3,284 bytes, 89 lines download raw bytes

1function initOnTrust() {
2    const contriesOnGDPR = new Map();
3    contriesOnGDPR.set("AT", "Austria");
4    contriesOnGDPR.set("BE", "Belgium");
5    contriesOnGDPR.set("BG", "Bulgaria");
6    contriesOnGDPR.set("CY", "Cyprus");
7    contriesOnGDPR.set("CZ", "Czech");
8    contriesOnGDPR.set("GE", "Germany");
9    contriesOnGDPR.set("DK", "Denmark");
10    contriesOnGDPR.set("EE", "Estonia");
11    contriesOnGDPR.set("ES", "Spain");
12    contriesOnGDPR.set("FI", "Finland");
13    contriesOnGDPR.set("FR", "France");
14    contriesOnGDPR.set("GR", "Greece");
15    contriesOnGDPR.set("HR", "Croatia");
16    contriesOnGDPR.set("HU", "Hungary");
17    contriesOnGDPR.set("IE", "Ireland");
18    contriesOnGDPR.set("IS", "Iceland");
19    contriesOnGDPR.set("IT", "Italy");
20    contriesOnGDPR.set("LI", "Liechtenstein");
21    contriesOnGDPR.set("LT", "Lithuania");
22    contriesOnGDPR.set("LU", "Luxembourg");
23    contriesOnGDPR.set("LV", "Latvia");
24    contriesOnGDPR.set("MT", "Malta");
25    contriesOnGDPR.set("NL", "Netherlands");
26    contriesOnGDPR.set("NO", "Norway");
27    contriesOnGDPR.set("PL", "Poland");
28    contriesOnGDPR.set("PT", "Portugal");
29    contriesOnGDPR.set("RO", "Romania");
30    contriesOnGDPR.set("SE", "Sweden");
31    contriesOnGDPR.set("SI", "Slovenia");
32    contriesOnGDPR.set("SK", "Slovakia");
33
34    window.addEventListener('DOMContentLoaded', function () {
35        if (document.getElementById('ot-stub') != null) {
36            document.getElementById('ot-sdk-btn1').style.display = 'block';
37        }
38    });
39
40    window.addEventListener("DOMContentLoaded", function () {
41        const userInEU = window.userInEU;
42        const geoc = window.geoc;
43        const geor = window.geor;
44        const statesWithDataProtection = ["CA", "VA", "CO", "CT", "UT", "IA", "DE", "NJ", "NE", "NH", "MT", "TN", "MN", "MD", "IN", "KY", "RI"];
45
46	const btnsdk1 = document.getElementById("ot-sdk-btn1");
47        const btnsdk2 = document.getElementById("ot-sdk-btn2");
48        const btncustomdns = document.getElementById("ot-custom-dns");
49
50        if (
51            userInEU === false &&
52            geoc &&
53            geor &&
54            geoc.toUpperCase() === "US" && (statesWithDataProtection.includes(geor.toUpperCase()))
55        ) {
56            if (btnsdk1) {
57                btnsdk1.style.display = "block";
58            }
59            if (btncustomdns) {
60                btncustomdns.style.display = "block";
61            }
62            if (btnsdk2) {
63                btnsdk2.style.display = "none";
64            }
65        }
66        else if (geoc && contriesOnGDPR.has(geoc.toUpperCase())) {
67            if (btnsdk1) {
68                btnsdk1.style.display = "none";
69            }
70            if (btncustomdns) {
71                btncustomdns.style.display = "none";
72            }
73            if (btnsdk2) {
74                btnsdk2.style.display = "block";
75            }
76        }
77        else if (userInEU === true) {
78            if (btnsdk1) {
79                btnsdk1.style.display = "block";
80                btnsdk1.textContent = "Show Purpose";
81            }
82            if (btnsdk2) {
83                btnsdk2.style.display = "none";
84            }
85        }
86    });
87}
88
89window.initOnTrust =  initOnTrust();

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.