diff --git a/www/assets/js/client.js b/www/assets/js/client.js index 0c9987f7..f4502c6d 100644 --- a/www/assets/js/client.js +++ b/www/assets/js/client.js @@ -77,6 +77,16 @@ if(params["novideo"] != undefined) { } if(params["channel"] == undefined) { + // Match URLs of the form http://site.tld/r/channel + var loc = document.location+""; + var m = loc.match(/\/r\/([a-zA-Z0-9]+)/); + if(m) { + socket.emit("joinChannel", { + name: m[1] + }); + return; + } + var main = $($(".container")[1]); var container = $("
").addClass("container").insertBefore(main); var row = $("").addClass("row").appendTo(container);