aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/nms.js
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-05-28 00:28:06 +0200
committerKristian Lyngstol <kristian@bohemians.org>2016-05-28 00:28:06 +0200
commit052ab619c0611fc7ad61ba53aa26e94a63df1fd5 (patch)
tree31a32b22c9432127b29079677ebda29f04760c70 /web/js/nms.js
parent6f1fc97c9c097249e316f85a914aa439b4273448 (diff)
front/api: Add user-provided nick to oplog
Fixes #84 It's really stupid simple, but it will work.
Diffstat (limited to 'web/js/nms.js')
-rw-r--r--web/js/nms.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/web/js/nms.js b/web/js/nms.js
index a3706b9..d76fa8f 100644
--- a/web/js/nms.js
+++ b/web/js/nms.js
@@ -54,6 +54,13 @@ var nms = {
},
interval: 10,
+ _user: undefined,
+ get user() { return this._user; },
+ set user(u) {
+ this._user = u;
+ document.getElementById('logbook-name').textContent = u;
+ saveSettings();
+ },
/*
* This is a list of nms[x] variables that we store in our
* settings-cookie when altered and restore on load.
@@ -62,7 +69,8 @@ var nms = {
'nightMode',
'menuShowing',
'vertical',
- 'interval'
+ 'interval',
+ 'user'
],
keyBindings:{
'-':toggleMenu,