Merge pull request #675 from aaronkvanmeerten/master
Only push to history with present page URL plus room name
This commit is contained in:
commit
6b704f184b
11
app.js
11
app.js
|
@ -51,14 +51,9 @@ function buildRoomName () {
|
||||||
if(!roomName) {
|
if(!roomName) {
|
||||||
let word = RoomnameGenerator.generateRoomWithoutSeparator();
|
let word = RoomnameGenerator.generateRoomWithoutSeparator();
|
||||||
roomName = word.toLowerCase();
|
roomName = word.toLowerCase();
|
||||||
let historyURL = window.location.pathname + word;
|
let historyURL = window.location.href + word;
|
||||||
//Trying to push state with URL "/" + roomName
|
//Trying to push state with current URL + roomName
|
||||||
var err = pushHistoryState(word, historyURL);
|
pushHistoryState(word, historyURL);
|
||||||
//If URL "/" + roomName is not good, trying with explicitly adding the
|
|
||||||
//domain name.
|
|
||||||
if(err && config.hosts.domain) {
|
|
||||||
pushHistoryState(word, "//" + config.hosts.domain + historyURL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return roomName;
|
return roomName;
|
||||||
|
|
Loading…
Reference in New Issue