From 5cd0be37c9e7d420a99763409b144b6413f485ca Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 23 Jul 2024 21:18:22 +0200 Subject: Remove title bar blinker from join page. --- public/join.js | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'public') diff --git a/public/join.js b/public/join.js index 8f0ea8a..88ec8d9 100644 --- a/public/join.js +++ b/public/join.js @@ -227,30 +227,6 @@ function send_invite() { } } -let blink_title = document.title -let blink_timer = 0 - -function start_blinker(message) { - let tick = false - if (blink_timer) - stop_blinker() - if (!document.hasFocus()) { - document.title = message - blink_timer = setInterval(function () { - document.title = tick ? message : blink_title - tick = !tick - }, 1000) - } -} - -function stop_blinker() { - document.title = blink_title - clearInterval(blink_timer) - blink_timer = 0 -} - -window.addEventListener("focus", stop_blinker) - function start_event_source() { if (!game) return @@ -438,7 +414,6 @@ function update() { if (!game) { window.game_enter.textContent = "Game deleted!" - stop_blinker() return } @@ -470,11 +445,6 @@ function update() { create_button("Delete", confirm_delete) if (may_start()) create_button("Start", start) - - if (start_status === 0 && game.status === 1) - start_blinker("STARTED") - else - stop_blinker() } } -- cgit v1.2.3