Support URLs of the form /r/channel for sites with a RewriteRule
This commit is contained in:
parent
9e8ca1ad3a
commit
a36d0d022e
|
@ -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 = $("<div/>").addClass("container").insertBefore(main);
|
||||
var row = $("<div/>").addClass("row").appendTo(container);
|
||||
|
|
Loading…
Reference in a new issue