parsec/webapp/index.html
2023-06-02 15:41:51 +08:00

48 lines
1.4 KiB
HTML

<!doctype html>
<html lang='en-us'>
<head>
<meta charset='utf-8'/>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<script src='static/lib/matoya.js'></script>
<script src='static/lib/weblib.js'></script>
<script src='static/lib/parsec.js'></script>
</head>
<body>
<script>
function endFunc() {
const sp = new URLSearchParams(window.location.search);
if (sp.get('session_id')) {
window.location = 'https://parsec.app/signup';
} else {
window.close();
}
}
(async function () {
if (!await MTY_Start('parsecd', PARSEC_ENV, endFunc)) {
document.body.style.fontFamily = 'sans-serif';
document.body.style.fontSize = '30px';
document.body.style.background = 'black';
document.body.style.color = 'white';
document.body.style.textAlign = 'center';
document.body.style.padding = '10% 30px 0 30px';
document.body.innerHTML =
'<div>Your browser does not support the Parsec web app. The web app requires WebGL and WebAssembly 64-bit support.</div>' +
'<div style="margin-top:30px">Check the <a href="https://parsec.app/downloads">Downloads</a> page for our native app.</div>';
}
window.history.replaceState(null, document.title, '/');
document.querySelector("body > textarea").remove();
})();
console.log('%cSTOP! ✋ This area is intended for developers. Pasting something here could give strangers access to your Parsec account.', 'font-size: 18px; font-weight: 700;');
</script>
</body>
</html>