From 26b2e198569875be01315301a13ade51f15ca22d Mon Sep 17 00:00:00 2001 From: deardrops Date: Mon, 10 Apr 2017 23:11:36 +0800 Subject: [PATCH] open window by absolute path --- testHelper.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testHelper.js b/testHelper.js index 9a0d751..3462d4e 100644 --- a/testHelper.js +++ b/testHelper.js @@ -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();