function gcke(n) { const cs = document.cookie.split(';'); for (let i=0; i { if (msg.data === 'multiple-tabs' && isAlpha) { bc.postMessage('already-open'); } if (msg.data === 'already-open') { let cc = (gcke("tabCheck_" + chn) === null); if (isAlpha && cc) { isAlpha = false; document.cookie = "tabCheck_" + chn + "=true; max-age=300"; alert('WARNING: You are using this application in multiple tabs. This is not supported and WILL result in corrupted data.'); } } }); bc.postMessage('multiple-tabs'); } }