fix(api): BAC-23 Remove old polling code (#95)

Reviewed-on: #95
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
This commit is contained in:
2025-12-01 20:41:27 +01:00
committed by Janis
parent f115c03ecb
commit a55f0b4b61
5 changed files with 0 additions and 57 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>