rjrst
This commit is contained in:
parent
acdc2b3298
commit
5f239653e0
@ -40,12 +40,13 @@ function initArenaModes() {
|
|||||||
card.addEventListener("click", () => {
|
card.addEventListener("click", () => {
|
||||||
const mode = card.dataset.mode;
|
const mode = card.dataset.mode;
|
||||||
if (mode === "1v1") {
|
if (mode === "1v1") {
|
||||||
const width = window.screen.width;
|
const margin = 50;
|
||||||
const height = window.screen.height;
|
const width = window.screen.width - margin * 2;
|
||||||
|
const height = window.screen.height - margin * 2;
|
||||||
const tab = window.open(
|
const tab = window.open(
|
||||||
"/arena/1v1",
|
"/arena/1v1",
|
||||||
"_blank",
|
"_blank",
|
||||||
`width=${width},height=${height},left=0,top=0`,
|
`width=${width},height=${height},left=${margin},top=${margin}`,
|
||||||
);
|
);
|
||||||
tab?.focus();
|
tab?.focus();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user