User:Ahmetlii/common.js

function Popup{localStorage.clear,newPopup,document.getElementById("popupClose").onclick=function{localStorage.setItem("closed",JSON.stringify({hiddenOn:Date.now})),document.getElementById("popupbox").remove}}function newPopup{var e=document.getElementById("mw-content-text"),t=document.createElement("div");t.id="popupbox",t.style.padding="20px",t.style.maxWidth="calc(100% - 80px)",t.style.backgroundColor="#f9d44d",t.style.borderRadius="5px",t.style.color="#000000",t.style.bottom="calc(0% + 20px)",t.style.right="calc(0% + 20px)",t.style.width="300px",t.style.position="fixed",t.style.boxShadow="0px 1px 5px black",t.style.zIndex="10",t.style.transition="0.5s cubic-bezier(0.43, 0.02, 0.52, 0.96)",t.innerHTML=' X YOUR TITLE HERE  YOUR TEXT HERE.',e.appendChild(t)}window.onload=function{if(localStorage.getItem("closed"))try{var e=JSON.parse(localStorage.getItem("closed"));Date.now-6048e5>e.hiddenOn&&Popup}catch(e){Popup}else Popup};