Files
GhomandArchie 291dcf9515 Merge pull request #10575 from Arturlang/TGUIs_Nexties
[TESTMERGE] Properly working TGUI Next
2021-01-04 19:47:54 -03:00

128 lines
4.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<!-- Early setup -->
<script id="data" type="application/json" data-ref="[ref]">{}</script>
<script type="text/javascript">
// Mark the beginning of initialization
window.__inception__ = new Date().getTime();
// Make window ref global
window.__ref__ = document.getElementById('data').getAttribute('data-ref');
// Global error handling
window.onerror = function (msg, url, line, col, error) {
// Proper stacktrace
var stack = error && error.stack;
// Ghetto stacktrace
if (!stack) {
stack = msg + '\n at ' + url + ':' + line;
if (col) {
stack += ':' + col;
}
}
// Append user agent info
stack += '\n\nUser Agent: ' + navigator.userAgent;
// Print error to the page
var errorRoot = document.getElementById('FatalError');
var errorStack = document.getElementById('FatalError__stack');
if (errorRoot) {
errorRoot.className = 'FatalError';
if (errorStack.textContent) {
errorStack.textContent += '\n\n' + stack;
}
else {
errorStack.textContent = stack;
}
}
// Send to the backend
location.href = 'byond://?src=' + window.__ref__
+ '&action=tgui:log&fatal=1'
+ '&log=' + encodeURIComponent(stack);
// Short-circuit further updates
window.__updateQueue__ = [];
window.update = window.initialize = function () {};
// Prevent default action
return true;
};
// Early initialization
window.__updateQueue__ = [];
window.update = window.initialize = function (stateJson) {
window.__updateQueue__.push(stateJson);
};
location.href = 'byond://?src=' + window.__ref__
+ '&action=tgui:initialize';
</script>
<!-- Styles -->
<link rel="stylesheet" type="text/css" href="tgui.bundle.css">
<!-- This is processed in byond, so interfaces can override the
html head if needed, for custom sheets of style etc. -->
<!--customheadhtml-->
<!-- Scripts -->
<script type="text/javascript" defer src="shim-html5shiv.js"></script>
<script type="text/javascript" defer src="shim-ie8.js"></script>
<script type="text/javascript" defer src="shim-dom4.js"></script>
<script type="text/javascript" defer src="shim-css-om.js"></script>
<script type="text/javascript" defer src="tgui.bundle.js"></script>
</head>
<body>
<!-- tgui container -->
<div id="react-root"></div>
<!-- Old tgui container -->
<div id="container" class="container"></div>
<!-- Fatal error container -->
<div id="FatalError" style="display: none">
<div class="FatalError__logo">
_____ _____ _______ _____
/\ \ /\ \ /::\ \ /\ \
/::\____\ /::\ \ /::::\ \ /::\ \
/::::| | \:::\ \ /::::::\ \ /::::\ \
/:::::| | \:::\ \ /::::::::\ \ /::::::\ \
/::::::| | \:::\ \ /:::/~~\:::\ \ /:::/\:::\ \
/:::/|::| | \:::\ \ /:::/ \:::\ \ /:::/__\:::\ \
/:::/ |::| | /::::\ \ /:::/ / \:::\ \ \:::\ \:::\ \
/:::/ |::| | _____ /::::::\ \ /:::/____/ \:::\____\ ___\:::\ \:::\ \
/:::/ |::| |/\ \ /:::/\:::\ \|:::| | |:::| |/\ \:::\ \:::\ \
/:: / |::| /::\____\/:::/ \:::\____\:::|____| |:::| /::\ \:::\ \:::\____\
\::/ /|::| /:::/ /:::/ \::/ /\:::\ \ /:::/ /\:::\ \:::\ \::/ /
\/____/ |::| /:::/ /:::/ / \/____/ \:::\ \ /:::/ / \:::\ \:::\ \/____/
|::|/:::/ /:::/ / \:::\ /:::/ / \:::\ \:::\ \
|::::::/ /:::/ / \:::\__/:::/ / \:::\ \:::\____\
|:::::/ /\::/ / \::::::::/ / \:::\ /:::/ /
|::::/ / \/____/ \::::::/ / \:::\/:::/ /
/:::/ / \::::/ / \::::::/ /
/:::/ / \::/____/ \::::/ /
\::/ / \::/ /
\/____/ \/____/
</div>
<marquee class="FatalError__header">
A fatal exception has occurred at 002B:C562F1B7 in TGUI.
The current application will be terminated.
Please remain calm, get to the nearest NTNet workstation
and send the copy of the following stack trace to:
https://github.com/Citadel-Station-13/Citadel-Station-13/issues Thank you for your cooperation.
</marquee>
<div id="FatalError__stack" class="FatalError__stack"></div>
<div class="FatalError__footer">
Nanotrasen (c) 2525-2559
</div>
</div>
<noscript>
<div class="NoticeBox">
<div>Javascript is required in order to use this interface.</div>
<div>Please enable Javascript and restart the game.</div>
</div>
</noscript>
</body>
</html>