summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-10-01 17:52:47 +0200
committerTor Andersson <tor@ccxvii.net>2022-10-05 17:36:50 +0200
commita6c8e710af51be01bc8e40fd9a0a294678837a8e (patch)
treef3e7382baceacaa24aebd7eeccc20799d8621ead /public
parent83f38c20b86f73502b30daf04558e0f9be0bde3d (diff)
downloadserver-a6c8e710af51be01bc8e40fd9a0a294678837a8e.tar.gz
Add menu to jump to the next active game.
Diffstat (limited to 'public')
-rw-r--r--public/common/play.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/public/common/play.js b/public/common/play.js
index ba59d6f..2fe3e2e 100644
--- a/public/common/play.js
+++ b/public/common/play.js
@@ -1011,4 +1011,9 @@ function add_main_menu_item(text, onclick) {
}
init_main_menu()
-add_main_menu_item("Go Home", () => window.open("/games/active", "_self"))
+if (params.role !== "Observer") {
+ add_main_menu_item("Go home", () => window.open("/games/active", "_self"))
+ add_main_menu_item("Go to next game", () => window.open("/games/next", "_self"))
+} else {
+ add_main_menu_item("Go home", () => window.open("/", "_self"))
+}