open window by absolute path

This commit is contained in:
deardrops 2017-04-10 23:11:36 +08:00 committed by WEBXOSS
parent 3b85cef504
commit 26b2e19856

View file

@ -43,9 +43,13 @@ function startBattle() {
location.reload();
return;
}
var win = window.open('./webxoss-client/?local=true');
var relativePath = './webxoss-client/?local=true';
var link = document.createElement('a');
link.href = relativePath;
var absolutePath = link.href;
var win = window.open(absolutePath);
win.addEventListener('load', function() {
var win2 = window.open('./?local=true');
var win2 = window.open(absolutePath);
win2.addEventListener('load', function() {
initClient(win2);
skipDiscards();