summaryrefslogtreecommitdiff
path: root/views/join.ejs
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-11-17 13:39:16 +0100
committerTor Andersson <tor@ccxvii.net>2021-11-17 19:05:15 +0100
commit327acfe1124cdafc5eb460a039222a160f867ba3 (patch)
tree20dc04fc3ed170881af2caf9ba0ae58a62f6020e /views/join.ejs
parent7b5ce7d3949755c12b663531ab5d0b3d3051de34 (diff)
downloadserver-327acfe1124cdafc5eb460a039222a160f867ba3.tar.gz
Simplify URL for playing games.
Diffstat (limited to 'views/join.ejs')
-rw-r--r--views/join.ejs16
1 files changed, 1 insertions, 15 deletions
diff --git a/views/join.ejs b/views/join.ejs
index fa33d5c..6558745 100644
--- a/views/join.ejs
+++ b/views/join.ejs
@@ -1,14 +1,4 @@
<%- include('header', { title: game.title_name }) -%>
-<%
-function to_english(k) {
- if (k === true) return 'yes';
- if (k === false) return 'no';
- return k.replace(/_/g, " ").replace(/^\w/, c => c.toUpperCase());
-}
-function format_options(options) {
- return Object.entries(options||{}).map(([k,v]) => v === true ? to_english(k) : `${to_english(k)}=${to_english(v)}`).join(", ");
-}
--%>
<style>
th, td { min-width: 10em; font-size: 16px; }
a.red { text-decoration: none; color: brown; font-size: 15px; }
@@ -35,13 +25,9 @@ Private: <%= game.private ? "yes" : "no" %>
<br>
Scenario: <%= game.scenario %>
<br>
-Options: <%- format_options(JSON.parse(game.options)) %>
+Options: <%= game.options %>
<br>
Description: <%= game.description || "No description." %>
-<br>
-Status: <span id="game_status"></span>
-<br>
-Result: <span id="game_result"></span>
<br clear=left>