Skip to content

Instantly share code, notes, and snippets.

@jdloft
Forked from thatkookooguy/user.css
Last active January 5, 2016 16:34
Show Gist options
  • Save jdloft/25432301284e76d951bb to your computer and use it in GitHub Desktop.
Save jdloft/25432301284e76d951bb to your computer and use it in GitHub Desktop.
This will make tty.js open up a terminal in fullscreen after a user connects & change the background color to the default purple. This should be added to tty.js/static/
.terminal {
background-color: #300A24 !important;
border: #300A24 solid 5px;
}
if (window.tty) {
tty.on('open', function () {
window.tty.socket.on('connect', function() {
var w = new window.tty.Window();
// Race condition; do not like. Without this timeout, the
// terminal is rendered slightly too high and spills off
// the top edge of the canvas. C'est la vie en JavaScript.
setTimeout(function () {
w.maximize();
}, 100);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment