neige d'aoust

knowledge, art, and other stuff

User Tools

Site Tools


terminal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
terminal [2025/03/13 02:04] Yukiterminal [2025/03/28 13:00] (current) Yuki
Line 9: Line 9:
 { {
   display: none;   display: none;
 +}
 +.xterm .xterm-viewport
 +{
 +  overflow-y: auto;
 } }
 </style> </style>
Line 15: Line 19:
 <script src="https://unpkg.com/@xterm/[email protected]/lib/addon-attach.js"></script> <script src="https://unpkg.com/@xterm/[email protected]/lib/addon-attach.js"></script>
 <script> <script>
-        var term = new Terminal();+        var term = new Terminal({"convertEol": true, "fontFamily": "Videoway Mono, monospaced", "fontSize": 11, "cols": 64, "rows": 36});
         term.open(document.getElementById('terminal'));         term.open(document.getElementById('terminal'));
-        term.write("idk what to do with this yet");+        var ws = new WebSocket("/ws/"); 
 +        ws.onerror = () => term.write("\x1b[1;31mterminal is down, please come back later\x1b[0m\n"); 
 +        var attachAddon = new AttachAddon.AttachAddon(ws); 
 +        term.loadAddon(attachAddon);
 </script> </script>
 </html> </html>
terminal.1741845846.txt.gz · Last modified: 2025/03/13 02:04 by Yuki