Jump to content

MediaWiki:Common.js

From nUSA Wiki
Revision as of 03:21, 3 January 2025 by Jord (talk | contribs)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
async function fetchMemberCount() {
    try {
        const response = await fetch('https://groups.roblox.com/v1/groups/758071');
        const data = await response.json();
        const memberCount = data.memberCount;
        document.getElementById('player-count').textContent = memberCount.toLocaleString();
    } catch (error) {
        console.error('Error fetching member count:', error);
        document.getElementById('player-count').textContent = 'unavailable';
    }
}

document.addEventListener('DOMContentLoaded', fetchMemberCount);