mirror of
https://github.com/yudai/gotty.git
synced 2026-01-23 01:36:09 +01:00
Support profile files to customize hterm
This commit is contained in:
parent
afd40ea15d
commit
45f65bfc29
7 changed files with 78 additions and 7 deletions
|
|
@ -7,7 +7,8 @@
|
|||
var term;
|
||||
|
||||
ws.onopen = function(event) {
|
||||
hterm.defaultStorage = new lib.Storage.Local()
|
||||
hterm.defaultStorage = new lib.Storage.Local();
|
||||
hterm.defaultStorage.clear();
|
||||
|
||||
term = new hterm.Terminal();
|
||||
|
||||
|
|
@ -46,6 +47,12 @@
|
|||
case '1':
|
||||
term.setWindowTitle(data);
|
||||
break;
|
||||
case '2':
|
||||
preferences = JSON.parse(data);
|
||||
Object.keys(preferences).forEach(function(key) {
|
||||
term.getPrefs().set(key, preferences[key]);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue