TAG
CSS
JavaScript
Result
Run
License
<h1>Click to this document to enabled.</h1>
body.disabled::after { content: ""; position: fixed; inset: 0; background-color: hwb(0 0% 100% / 0.5); } h1 { display: flex; justify-content: center; }
window.addEventListener("load", function() { document.body.classList.add("disabled"); setInterval(() => { if(document.hasFocus()) { document.body.classList.remove("disabled"); document.body.children[0].textContent = "OK, Enabeld"; } else { document.body.classList.add("disabled"); document.body.children[0].textContent = "Click to this document to enabled."; } }, 300); });
Console
expand_less
License
License
by DevDic
Close