Bonk.io Map Counter

Counts maps and displays the count on the top left of the "Level Select" menu.

// ==UserScript==
// @name         Bonk.io Map Counter
// @namespace    http://tampermonkey.net/
// @version      0.01
// @description  Counts maps and displays the count on the top left of the "Level Select" menu.
// @author       Silly One
// @match        https://*.bonk.io/*
// @match        https://*.bonkisback.io/*
// @grant        none
// @license      MIT
// ==/UserScript==

let mapCount = 0;
const countText = document.createElement('div');
countText.style.position = 'absolute';
countText.style.top = '0';
countText.style.left = '7px';
countText.style.padding = '0';
countText.style.color = 'white';
countText.innerText = 'Map Count: 0';
const topBar = document.querySelector('#maploadwindowtopbar');
if (topBar) {
    topBar.appendChild(countText);
}
setInterval(() => {
    const divCount = document.querySelectorAll('div.maploadwindowmapdiv').length;
    mapCount = divCount;
    countText.innerText = `Map Count: ${mapCount}`;
}, 1000);