fix(api): BAC-23 Remove old polling code
This commit is contained in:
@@ -23,16 +23,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<script>
|
<script>
|
||||||
function waitForFunction(name, checkInterval = 100) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
const timer = setInterval(() => {
|
|
||||||
if (typeof window[name] === "function") {
|
|
||||||
clearInterval(timer);
|
|
||||||
resolve(window[name]);
|
|
||||||
}
|
|
||||||
}, checkInterval);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
waitForFunction("pollForUpdates").then(fn => fn('@gamelobby.id'));
|
|
||||||
connectWebSocket()
|
connectWebSocket()
|
||||||
</script>
|
</script>
|
||||||
@@ -130,17 +130,6 @@
|
|||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function waitForFunction(name, checkInterval = 100) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
const timer = setInterval(() => {
|
|
||||||
if (typeof window[name] === "function") {
|
|
||||||
clearInterval(timer);
|
|
||||||
resolve(window[name]);
|
|
||||||
}
|
|
||||||
}, checkInterval);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
waitForFunction("pollForUpdates").then(fn => fn('@gamelobby.id'));
|
|
||||||
connectWebSocket()
|
connectWebSocket()
|
||||||
canPlayCard = @gamelobby.logic.getCurrentPlayer.contains(player);
|
canPlayCard = @gamelobby.logic.getCurrentPlayer.contains(player);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -64,16 +64,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function waitForFunction(name, checkInterval = 100) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
const timer = setInterval(() => {
|
|
||||||
if (typeof window[name] === "function") {
|
|
||||||
clearInterval(timer);
|
|
||||||
resolve(window[name]);
|
|
||||||
}
|
|
||||||
}, checkInterval);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
waitForFunction("pollForUpdates").then(fn => fn('@gamelobby.id'));
|
|
||||||
connectWebSocket()
|
connectWebSocket()
|
||||||
</script>
|
</script>
|
||||||
@@ -110,16 +110,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function waitForFunction(name, checkInterval = 100) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
const timer = setInterval(() => {
|
|
||||||
if (typeof window[name] === "function") {
|
|
||||||
clearInterval(timer);
|
|
||||||
resolve(window[name]);
|
|
||||||
}
|
|
||||||
}, checkInterval);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
waitForFunction("pollForUpdates").then(fn => fn('@gamelobby.id'));
|
|
||||||
connectWebSocket()
|
connectWebSocket()
|
||||||
</script>
|
</script>
|
||||||
@@ -98,18 +98,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<script>
|
<script>
|
||||||
/*
|
|
||||||
function waitForFunction(name, checkInterval = 100) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
const timer = setInterval(() => {
|
|
||||||
if (typeof window[name] === "function") {
|
|
||||||
clearInterval(timer);
|
|
||||||
resolve(window[name]);
|
|
||||||
}
|
|
||||||
}, checkInterval);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
waitForFunction("pollForUpdates").then(fn => fn('@gamelobby.id'));
|
|
||||||
*/
|
|
||||||
connectWebSocket()
|
connectWebSocket()
|
||||||
</script>
|
</script>
|
||||||
Reference in New Issue
Block a user