Skip to content

Commit

Permalink
timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
EchtkPvL-bot committed Feb 13, 2024
1 parent 007cc6d commit 51676dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
const urlParams = new URLSearchParams(window.location.search);
const channel = urlParams.get('channel') ?? 'echtkpvlbot';
const mode = urlParams.get('mode') ?? 0;
const timeout = urlParams.get('timeout') ?? 1999;

var game = new TwitchSweeper(mode, 'game');

setInterval(gameMeta, 100);
function gameMeta() {
var time = game.getTime();
if (time > 1999) window.location.reload();
if (time > timeout) window.location.reload();
var el = document.getElementById('time');
el.innerHTML = time;

Expand Down

0 comments on commit 51676dc

Please sign in to comment.