1
0
Fork 0

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(); location.reload();
return; 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() { win.addEventListener('load', function() {
var win2 = window.open('./?local=true'); var win2 = window.open(absolutePath);
win2.addEventListener('load', function() { win2.addEventListener('load', function() {
initClient(win2); initClient(win2);
skipDiscards(); skipDiscards();