1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 08:14:48 +00:00

fix checkbox

This commit is contained in:
zumbiepig 2024-08-21 16:20:01 -07:00
parent 602c694fc8
commit 2f812faad0
No known key found for this signature in database
GPG Key ID: 17C891BE28B953DE

View File

@ -9,7 +9,8 @@ if (window.location.pathname === '/settings/') {
usernameInput.placeholder = storage.local.get('username') ?? '';
themeSelect.value = storage.local.get('theme') ?? 'default';
// offlineCheckbox.checked = storage.local.get('offlineCache') ?? false;
adsCheckbox.checked = storage.local.get('showAds') ?? true;
const showAds = storage.local.get('showAds');
adsCheckbox.checked = showAds === null ? true : showAds;
usernameInput.addEventListener('input', () => {
let username = usernameInput.value.replace(/[^A-Za-z0-9]/g, '_').substring(0, 16);