aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMango0x45 <thomasvoss@live.com> 2021-05-14 22:03:48 +0200
committerMango0x45 <thomasvoss@live.com> 2021-05-14 22:03:48 +0200
commit2af25e45f5efdee33d96268d6700ec7d2c3db061 (patch)
treeddbd48fcfa8e541079b0ea95cb214c0cc1e3513d
parente838131b9eacfa68f3e8cf79c81228aec64849da (diff)
Fix more bugs
-rw-r--r--settings.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/settings.js b/settings.js
index 51b743d..db0cd4c 100644
--- a/settings.js
+++ b/settings.js
@@ -7,7 +7,7 @@ function set_settings()
change_theme();
remove_titles();
remove_text();
- set_mod_message();
+ set_mod_message(null);
}
/* Initialize the settings page by flipping the switches and such */
@@ -84,10 +84,11 @@ function remove_text()
/* Set a custom mod message */
function set_mod_message(event)
{
- if (event.target.value.replace(/\s/g, ""))
+ if (event && event.target.value.replace(/\s/g, ""))
localStorage.setItem("custom_mod_message", event.target.value);
else {
- event.target.value = mod_message_default;
+ if (event)
+ event.target.value = mod_message_default;
localStorage.setItem("custom_mod_message", mod_message_default);
}
}