mirror of https://github.com/calzoneman/sync.git
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) {
|
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 main = $($(".container")[1]);
|
||||||
var container = $("<div/>").addClass("container").insertBefore(main);
|
var container = $("<div/>").addClass("container").insertBefore(main);
|
||||||
var row = $("<div/>").addClass("row").appendTo(container);
|
var row = $("<div/>").addClass("row").appendTo(container);
|
||||||
|
|
Loading…
Reference in New Issue