Last active
January 28, 2016 08:12
-
-
Save thatkookooguy/a08f447bf491e091e5e4 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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.terminal { | |
background-color: #300A24 !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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