mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 01:21:30 +00:00
## About The Pull Request Prettier (an auto formatter) is set to only run within the tgui folder currently. This removes that limitation, allowing it to automatically format all supported files in the repo (.js, .html, .yml [etc](https://prettier.io/docs/)) I made a few exceptions for bundled and generated files ## Why It's Good For The Game I'm of the opinion that code should look uniform and am lazy enough to want CTRL-S to format files without having to think beyond that ## Changelog
46 lines
1.1 KiB
HTML
46 lines
1.1 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<body>
|
|
<script>
|
|
lastseentypedtext = "";
|
|
function getoutput() {
|
|
setTimeout(getoutput, 1000);
|
|
window.location =
|
|
"byond://winget?callback=checkoutput&id=:Input&property=text";
|
|
}
|
|
function checkoutput(props) {
|
|
if (typeof props !== "object") return;
|
|
|
|
if (typeof props.text !== "string" && !(props.text instanceof String))
|
|
return;
|
|
|
|
var text = props.text;
|
|
|
|
if (text == lastseentypedtext) return;
|
|
|
|
lastseentypedtext = text;
|
|
|
|
var words = text.split(" ");
|
|
var verb = words[0];
|
|
var argument = "";
|
|
var argument_length = -1;
|
|
|
|
if (words.length >= 2) {
|
|
words.splice(0, 1);
|
|
argument = words.join(" ");
|
|
argument_length = argument.length;
|
|
}
|
|
|
|
if (argument_length > 0 && argument[0] == '"') argument_length -= 1;
|
|
|
|
window.location =
|
|
"byond://?commandbar_typing=1&verb=" +
|
|
encodeURIComponent(verb) +
|
|
"&argument_length=" +
|
|
argument_length;
|
|
}
|
|
setTimeout(getoutput, 2000);
|
|
</script>
|
|
</body>
|
|
</html>
|