show / hide irc channel names based on URL
authorAndrew Engelbrecht <andrew@fsf.org>
Mon, 15 Mar 2021 22:07:28 +0000 (18:07 -0400)
committerAndrew Engelbrecht <andrew@fsf.org>
Mon, 15 Mar 2021 22:07:58 +0000 (18:07 -0400)
2021/assets/js/stream.js
2021/vip-abk2bvlwswnb/live [new symlink]

index fbe072373a4025181a858a8f3033989ee23011dc..42d75bf15208afb87a920c7d0d5f8b8b26065f8d 100644 (file)
@@ -305,6 +305,21 @@ app.view = function(ctrl) {
     return m("span");
   }
 
+  // show or hide irc info based on page URL
+  if (!window.location.pathname.match(RegExp("\/2021\/live.*"))) {
+    var irc_info = [
+      "Freenode IRC channel for ",
+      stream.name,
+      ": ",
+      m("strong", ["/join ", stream.ircChannel])
+    ];
+  } else {
+    var irc_info = [
+      m("strong", ["Register"]),
+      " to access IRC rooms"
+    ];
+  }
+
   return [
     renderRoomSelector(),
     m("h2", stream.name),
@@ -318,12 +333,7 @@ app.view = function(ctrl) {
         "Conference-wide Freenode IRC channel: ",
         m("strong", "/join #libreplanet")
       ]),
-      m("li", [
-        "Freenode IRC channel for ",
-        stream.name,
-        ": ",
-        m("strong", ["/join ", stream.ircChannel])
-      ]),
+      m("li", irc_info),
       // m("li", [
       //   "Conference-wide Mumble (voice chat) server: ",
       //   m("strong", "mumble.fsf.org")
diff --git a/2021/vip-abk2bvlwswnb/live b/2021/vip-abk2bvlwswnb/live
new file mode 120000 (symlink)
index 0000000..bcc04b6
--- /dev/null
@@ -0,0 +1 @@
+../live/
\ No newline at end of file