Advertisement
nicolaslagios

Untitled

Sep 2nd, 2024
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. function CookiebotOnAcceptListenerFunction(e) {
  2. if ($.cookie("rlx-once") == "true") {
  3. return;
  4. }
  5.  
  6. `if ($("#rlx-corner").length > 0) { if (Cookiebot.consent.marketing) { var frame = document.getElementById("rlx-corner"); if (frame && frame.contentWindow) { frame.contentWindow.postMessage( "consentTrue", "https://corners.rolex.com" ); frame.contentWindow.postMessage( "consentValidation", "https://corners.rolex.com" ); } $.cookie("rlx-consent", true, { path: "/" }); $.cookie("rlx-once", true, { path: "/" }); } else { var frame = document.getElementById("rlx-corner"); if (frame && frame.contentWindow) { frame.contentWindow.postMessage( "consentFalse", "https://corners.rolex.com" ); } $.cookie("rlx-consent", false, { path: "/" }); $.cookie("rlx-once", false, { path: "/" }); } } ` } window.addEventListener( "CookiebotOnAccept", CookiebotOnAcceptListenerFunction ); function CookiebotOnDeclineListenerFunction(e) { if ($("#rlx-corner").length > 0) { var frame = document.getElementById("rlx-corner"); if (frame && frame.contentWindow) { frame.contentWindow.postMessage("consentFalse", "[https://corners.rolex.com"](https://corners.rolex.com%22)); } $.cookie("rlx-consent", false, { path: "/" }); $.cookie("rlx-once", false, { path: "/" }); } } window.addEventListener( "CookiebotOnDecline", CookiebotOnDeclineListenerFunction ); $(document).ready(function (jQuery) { if (typeof $.cookie != "undefined") { if ($("#rlx-corner").length > 0) { $.cookie("rlx-consent", false, { path: "/" }); if ($.cookie("CookieConsent") != null) { var cookieStr = $.cookie("CookieConsent"); cookieStr = cookieStr.substr(1, cookieStr.length - 2); ` var cookieArr = cookieStr.split(","); var cookieObj = {}; cookieArr.forEach(function (item) { cookieObj[item.split(":")[0]] = item.split(":")[1]; }); if (cookieObj.marketing == 'true') { $.cookie("rlx-consent", true, { path: "/" }); $.cookie("rlx-once", true, { path: "/" }); } } } else { $.cookie("rlx-consent", false, { path: "/" }); $.cookie("rlx-once", false, { path: "/" }); } } else { $.cookie("rlx-consent", false, { path: "/" }); $.cookie("rlx-once", false, { path: "/" }); } if ($("#rlx-corner").length > 0) { if ($.cookie("rlx-consent") == true) { var frame = document.getElementById("rlx-corner"); if (frame && frame.contentWindow) { frame.contentWindow.postMessage( "consentTrue", "https://corners.rolex.com" ); frame.contentWindow.postMessage( "consentValidation", "https://corners.rolex.com" ); } } else { var frame = document.getElementById("rlx-corner"); if (frame && frame.contentWindow) { frame.contentWindow.postMessage( "consentFalse", "https://corners.rolex.com" ); } } } }); ` {% if rolex_iframe_flag %} var rlxCorner = document.getElementById("rlx-corner"); if (rlxCorner && rlxCorner.contentWindow) { rlxCorner.contentWindow.postMessage("consentFalse","[https://corners.rolex.com"](https://corners.rolex.com%22)); } {% endif %} HTML TWIG
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement