|
|
@@ -36,16 +36,33 @@ if (supportsLocalStorage()) {
|
|
36
|
36
|
}
|
|
37
|
37
|
|
|
38
|
38
|
var Settings = {
|
|
|
39
|
+
|
|
|
40
|
+ /**
|
|
|
41
|
+ * Sets the local user display name and saves it to local storage
|
|
|
42
|
+ *
|
|
|
43
|
+ * @param newDisplayName the new display name for the local user
|
|
|
44
|
+ * @returns {string} the display name we just set
|
|
|
45
|
+ */
|
|
39
|
46
|
setDisplayName: function (newDisplayName) {
|
|
40
|
47
|
displayName = newDisplayName;
|
|
41
|
48
|
window.localStorage.displayname = displayName;
|
|
42
|
49
|
return displayName;
|
|
43
|
50
|
},
|
|
|
51
|
+
|
|
|
52
|
+ /**
|
|
|
53
|
+ * Returns the currently used by the user
|
|
|
54
|
+ * @returns {string} currently valid user display name.
|
|
|
55
|
+ */
|
|
|
56
|
+ getDisplayName: function () {
|
|
|
57
|
+ return displayName;
|
|
|
58
|
+ },
|
|
|
59
|
+
|
|
44
|
60
|
setEmail: function (newEmail) {
|
|
45
|
61
|
email = newEmail;
|
|
46
|
62
|
window.localStorage.email = newEmail;
|
|
47
|
63
|
return email;
|
|
48
|
64
|
},
|
|
|
65
|
+
|
|
49
|
66
|
getSettings: function () {
|
|
50
|
67
|
return {
|
|
51
|
68
|
email: email,
|