function detectSandbox(){function redirect(){window.location.href="/sandboxed.html?v=2.1#"+encodeURIComponent(window.location.href)}if(window.frameElement){console.log("Running inside an iframe.");try{window.frameElement.hasAttribute("sandbox")&&(console.log("Sandbox attribute detected."),redirect())}catch(e){console.log("Sandbox detection via attribute failed:",e)}}else console.log("Not inside an iframe.");try{document.domain=document.domain}catch(e){e.toString().toLowerCase().includes("sandbox")&&(console.log("Sandbox detected via document.domain restriction."),redirect())}try{eval("console.log('Eval is allowed');")}catch(e){console.log("Eval is restricted (sandboxed)."),redirect()}try{let script=document.createElement("script");script.innerHTML="console.log('Inline script executed');",document.body.appendChild(script)}catch(e){console.log("Inline scripts are restricted (sandboxed)."),redirect()}}detectSandbox();