mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-26 10:05:10 +00:00
does this work
This commit is contained in:
@@ -327,11 +327,20 @@ if (window.location.pathname === '/') {
|
||||
serviceworker.register('/sw.js');
|
||||
} else {
|
||||
if (storage.local.get('showAds') !== false) {
|
||||
const adsense = document.createElement('script');
|
||||
adsense.async = true;
|
||||
adsense.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1132419379737567';
|
||||
adsense.crossOrigin = 'anonymous';
|
||||
document.head.appendChild(adsense);
|
||||
const googleAdsScript = document.createElement('script');
|
||||
googleAdsScript.async = true;
|
||||
googleAdsScript.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1132419379737567';
|
||||
googleAdsScript.crossOrigin = 'anonymous';
|
||||
document.head.appendChild(googleAdsScript);
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const adsContainers = document.getElementsByClassName('ads-container');
|
||||
|
||||
for (let i = 0; i < adsContainers.length; i++) {
|
||||
const adsContainer = adsContainers[i] as HTMLElement;
|
||||
adsContainer.style.display = 'block';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
@@ -9,7 +9,7 @@ if (window.location.pathname === '/settings/') {
|
||||
usernameInput.placeholder = storage.local.get('username') ?? '';
|
||||
themeSelect.value = storage.local.get('theme') ?? '';
|
||||
// offlineCheckbox.checked = storage.local.get('offlineCache') ?? false;
|
||||
adsCheckbox.checked = storage.local.get('showAds');
|
||||
adsCheckbox.checked = storage.local.get('showAds') !== false;
|
||||
|
||||
usernameInput.addEventListener('input', () => {
|
||||
let username = usernameInput.value.replace(/[^A-Za-z0-9]/g, '_').substring(0, 16);
|
||||
|
||||
Reference in New Issue
Block a user