PageSourceSearch

https://shop.shiraz-restaurant.de/main-res2/js/dialogFast.js

js shiraz-restaurant.de collected 2026-10-07 18:31:11 UTC 6,677 bytes, 1 lines download raw bytes

1const POPUP_AS_POPOUT_TEMPLATE='\n<div class="responsivePopupOverlay responsivePopoutOverlay"></div>\n<div class="responsivePopup responsivePopout imprint">\n    <div class="responsivePopupWrapper">\n        <div class="responsivePopupContent">\n            <div class="responsivePopupCloseFast redButton waitingForPayment hidden"></div>\n            <h2 class="mainCaption"></h2>\n            <h3 class="subCaption"></h3>\n            <div class="popupText responsivePopupPadded waitingForPayment"></div>\n            <div class="responsivePopupPadded waitingForPayment">\n                <div class="loader hidden"></div>\n            </div>\n        </div>\n    </div>\n    <div class="responsivePopupScroll"></div>\n</div>\n';if(!window.location.href.includes("/menu"))if(window.location.href.includes("#waitingForPayment"))checkForPaymentFast("ajax_waiting_for_payment.php");else if(window.location.href.includes("#obProducts"))checkForOrderboxFast("ajax_orderbox.php");else if(window.location.href.includes("#obCompletion"))checkForOrderboxFast("ajax_orderbox_completion.php");else if(window.location.search.includes("ssArea")||window.location.search.includes("pickupChange")){const e=window.location.origin+window.location.pathname;history.pushState({path:e},"",e),checkForOrderboxFast("ajax_orderbox.php")}else window.location.search.includes("showLogin")&&checkForLoginPopupSlow();async function checkForOrderboxFast(e){document.body.style.display="none";try{const o=await fetch(getShopUrlForAjax(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fromDialog:null})});if(!o.ok)throw new Error("Network response was not ok.");const n=await o.text();document.body.style.display="",openDialogFast(n)}catch(e){document.body.style.display="",console.error("Fetch operation issue:",e)}}function checkForPaymentFast(e){openStandardPopupFast({id:"waitingForPayment",mainCaption:"Status der Zahlung wird überprüft",subCaption:"",popupText:"Wir prüfen den erfolgreichen Zahlungseingang. Bitte warten...",showLoader:!0,template:POPUP_AS_POPOUT_TEMPLATE,ajax:e},!1,checkIfPaymentSuccess)}function checkForLoginPopupSlow(){const e=new URL(window.location.href);e.searchParams.delete("showLogin"),window.history.replaceState({},document.title,e.toString());const o=()=>{"function"==typeof popupShowLogin?popupShowLogin():setTimeout(o,10)};o()}function openDialogFast(e){const o=navigator.userAgent.match(/(iPod|iPhone|iPad)/i),n=document.querySelector(".responsiveDialog");o?(document.documentElement.classList.add("ios"),document.body.classList.add("ios")):document.body.classList.add("overflowHidden"),document.body.insertAdjacentHTML("afterbegin",e),n&&(n.classList.add("visible",o?"ios":""),o||(n.scrollTop=0)),e.includes("orderbox orderboxProducts")?updateHistoryStateIfDifferent("#obProducts"):e.includes("orderbox orderboxCompletion")&&updateHistoryStateIfDifferent("#obCompletion");const t=()=>{"function"==typeof registerDialogScrolling?(registerDialogScrolling(),registerOrderboxEvents(e)):setTimeout(t,10)};t()}function openStandardPopupFast(e,o=!1,n=null){document.querySelectorAll(".responsivePopup, .responsivePopupOverlay").forEach((e=>{e.classList.contains("responsivePopout")||e.classList.contains("responsivePopoutOverlay")||e.remove()})),document.documentElement.classList.add("overflowHidden"),document.body.classList.add("overflowHidden");let t=document.createElement("div");t.innerHTML=e.template,t.querySelectorAll(".responsivePopup, .responsivePopupOverlay").forEach((function(o){o.classList.add(e.id),o.classList.add("visible")})),t.querySelector(".mainCaption").innerHTML=e.mainCaption??"",t.querySelector(".subCaption").innerHTML=e.subCaption??"",t.querySelector(".popupText").innerHTML=e.popupText??"",e.showLoader&&t.querySelector(".loader").classList.remove("hidden"),document.body.insertAdjacentHTML("afterbegin",t.innerHTML);const i=document.querySelector(".responsivePopup");i&&(i.scrollTop=0);if(document.querySelector("."+e.id+" .responsivePopupCloseFast").addEventListener("click",(function(){setTimeout((function(){document.querySelectorAll("."+e.id).forEac
1h((function(e){e.remove()})),0===document.querySelectorAll(".responsiveDialog").length&&(document.body.classList.remove("overflowHidden"),document.documentElement.classList.remove("overflowHidden")),o&&setTimeout((function(){window.location.href=window.location.href}),100)}),300)})),i){let e=document.querySelector(".responsivePopupScroll");e||(e=document.createElement("div"),e.className="responsivePopupScroll",document.body.appendChild(e)),i.addEventListener("scroll",(function(){i.scrollTop>0?e.classList.add("visible"):e.classList.remove("visible")}))}const r=document.querySelector(".responsivePopupScroll");if(r&&r.addEventListener("click",(function(){i&&(i.scrollTop=0)})),"function"==typeof n)try{n(e)}catch(e){console.error("Error in afterCall:",e)}}async function checkIfPaymentSuccess(e){const o=getOrderHash(),n=getShopUrlForAjax(e.ajax)+"?";await async function t(i){try{document.querySelector("."+e.id+" .loader").classList.remove("hidden");const r=await fetch(n+new URLSearchParams({orderHash:o}));if(!r.ok)throw new Error("Es gab ein Problem mit der Herstellung der Verbindung.");const s=await r.text();if("PAID"!==s){if("WAITING_FOR_PAYMENT"===s)return await new Promise((e=>setTimeout(e,1e3*i))),t(i);throw new Error("Es gab ein Problem mit der Zahlung.")}{const n=()=>
1{if("function"==typeof openTracking)if(stripUrlSearchParamsAndHashes(),hasTrackingUrl)window.location="/order_state.html?hash="+o;else{document.querySelector("."+e.id+" .responsivePopupCloseFast").click(),openTracking()}else setTimeout(n,10)};n()}}catch(o){document.querySelector("."+e.id+" .loader").classList.add("hidden"),document.querySelector("."+e.id+" .responsivePopupCloseFast").classList.remove("hidden"),document.querySelector("."+e.id+" .popupText").innerHTML="Fehler: "+(o.message||"Unbekannter Fehler"),console.error("Fetch operation issue:",o)}}(1)}function getShopUrlForAjax(e){return"/"+window.location.pathname.split("/")[1]+"/"+e}function getOrderHash(){const e=new URL(document.location.href).searchParams.get("orderHash");return e?e.replace(/[^a-zA-Z0-9]/g,""):null}function redirectToCartFinalStep(){const e=window.location.origin+window.location.pathname+"#obCompletion";updateHistoryStateIfDifferent("#obCompletion"),window.location.href=e}function updateHistoryStateIfDifferent(e){var o=window.location.href.split("#")[0]+e;history.state!==o&&history.replaceState({path:e},"",o)}function stripUrlSearchParamsAndHashes(){const e=new URL(window.location.href);e.search="",e.hash="",window.history.replaceState({},document.title,e.toString())}

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.