1function OptanonWrapper() { 2 3function startSigning() { 4 var collectionPointId = "0534b89e-6fd4-470c-804b-29dd3289c11d" 5 OneTrust.UpdateConsent("Category", "4:0"); 6 OneTrust.UpdateConsent("Category", "2:0"); 7 sessionStorage.setItem("signing", "true"); 8 window.addEventListener('OnetrustFormLoaded', (event) => { 9 if(event.detail[collectionPointId]){ 10 document.querySelector(".ot-webform"+ collectionPointId + " button.ot-close").addEventListener("click", function() { 11 endSigning() 12 } 13 , false); 14 15 } 16 17 18 }); 19 20 OneTrust.webform.InstallCP("0534b89e-6fd4-470c-804b-29dd3289c11d"); 21 } 22 23 function endSigning() { 24 sessionStorage.removeItem("signing"); 25 } 26 27 function checkSigning() { 28 return ("signing" in sessionStorage); 29 } 30 31 function isSignNeeded() { 32 // Add here the condition with and/or statements for all categories 33 var WA_NV_User = (OneTrust.getGeolocationData().state == "WA" || OneTrust.getGeolocationData().state == "NV"); 34 return (WA_NV_User && OnetrustActiveGroups.includes(",2,") && OnetrustActiveGroups.includes(",4,")); 35 } 36 37 OneTrust.OnConsentChanged((e) => { 38 // If OnetrustActiveGroups contains the categories that need signature: 39 if (isSignNeeded()) { 40 // Check if the person is not already signing at the moment 41 if (!checkSigning()) { 42 // If not, we are good to show to start the signing process 43 startSigning(); 44 } else { 45 // Else you can officially end the signing 46 endSigning(); 47 } 48 } 49 }); 50 51 document.querySelector('.ot-close-icon').addEventListener('blur', function() { 52 document.querySelector('.logo.header__clickable').focus(); 53 }); 54}
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.