1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00
This commit is contained in:
zumbiepig
2024-08-31 08:14:02 -07:00
parent 85322cfdf7
commit c6f14eea16
9 changed files with 30 additions and 18 deletions

View File

@@ -330,9 +330,8 @@ if (window.location.pathname === '/') {
googleAdsPush.text = '(adsbygoogle = window.adsbygoogle || []).push({});';
document.body.appendChild(googleAdsPush);
const adsContainers = document.getElementsByClassName('ads-container');
for (let i = 0; i < adsContainers.length; i++) {
const adsContainer = adsContainers[i] as HTMLElement;
const adsContainers = Array.from(document.getElementsByClassName('ads-container')) as HTMLElement[];
for (const adsContainer of adsContainers) {
adsContainer.style.display = 'flex';
}
});

View File

@@ -53,7 +53,7 @@ self.addEventListener('activate', (event) => {
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request).then((response) => {
return response || fetch(event.request);
return response ?? fetch(event.request);
})
);
});