Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Commit 7f6730b

Browse files
committed
fixed multiple window opening bug
1 parent 61ba9ed commit 7f6730b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

script/gamemenu.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@
1414
}
1515
document.getElementById('pl').addEventListener('click', () => {
1616
buttonClick.play();
17-
window.open(
17+
if (link == '') console.log('ignoring to open...');
18+
else { window.open(
1819
'child.html?uri=' + link,
1920
'_blank',
2021
'icon="../assets/logo_1024.png", nodeIntegration=true, nodeIntegrationInSubFrames=true, nodeIntegrationInWorker=true, contextIsolation=false, webviewTag=true, autoHideMenuBar=true, width=1066, height=600'
2122
)
23+
console.log('opening ' + link)
24+
}
2225
})
2326
document.getElementById('bk').onclick = () => {
2427
tabSwitch.play();
2528
document.getElementById('game-info').style.display = 'none'
29+
link = ''
2630
}
2731
}

0 commit comments

Comments
 (0)