From 9ed625f893edb7944fa7fd0f8cf7aff888e85298 Mon Sep 17 00:00:00 2001 From: mohammedanaf Date: Sat, 19 Oct 2024 22:56:03 +0530 Subject: [PATCH] PWA enabled --- images/logo-192x192.png | Bin 0 -> 2737 bytes images/logo-512x512.png | Bin 0 -> 9969 bytes index.html | 3 +++ manifest.json | 21 ++++++++++++++++++++ script.js | 15 +++++++++++++- service-worker.js | 43 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 images/logo-192x192.png create mode 100644 images/logo-512x512.png create mode 100644 manifest.json create mode 100644 service-worker.js diff --git a/images/logo-192x192.png b/images/logo-192x192.png new file mode 100644 index 0000000000000000000000000000000000000000..29e63df42ec346ccc70242e8bd4758d134cbcb75 GIT binary patch literal 2737 zcmZ8jc|6oz7r(!mVVLakWE(tEwlI{DY?GyoW$aU;OxY^ygJek!5+Y?AyF_8^nvzmx zOoYgi$krgQts+a7tnc)`|2^mPz2~0Kx%Yd%=bpcAyfxu8FG?H*0N}-&8r!mW#-GIn zXM1;8t|kDGu(gG~$!UL!RuxSaP-H<0fBYZFe*uReYCh^wj(U793mg(lE*t}YtNYLp z)EpQ!kBt>3!1zAJ_|O0~Z;^>uVM1)MV2bMAG&Y?D6hK)%yd?i8ol`!vs_LN0FD78; zSC}x2cMbdKfAOD;SUeTuP2D$n?TL6xhuP-(up zSM74sA1#d6(-DRs3nq`fQu_Lh9GmMyJ0n{eHz6$dvx#Gg31`<~)7dxKEeWL*X1vs0 zV!(`Q1142u^xVtB>Ihb~SJ;nb6WLv9_|Vpv;46?{u1B;A9_zQgCe0p`eUL4|4#1fL z-_|aRZ|!o(@uAj4bsios9#!0#W3WDGeVlXU-r5PUAJba7Z*IC7xb^C;h|SwC-^F&r zY0^RG6@QuS6e(}@Zf@>SvuG|o_qjIj{@&gGaKUXi>;wQ@8+hZB_94Ubd2_+TrUEg7 zG7Ooui0&HK&ZHsk=1H<6v(pU|oV$MO{v3tr@tA_R`$W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bkul8_34=Rl=L}|M9-}b3V)F2=nY3olkp&hJh6QL#3^1a`|E)Q!k6*2q zbQ-C3WKg}dBD|*`8{f@DU}Z)Lv_Q!{os43^BTtffFG7nyO@^7erT)s^!xVJ19XyY_ z7I%^_g`>TFpcWu6q2@&FFUoq#6Xftmar#t@ijdm8L8hTj-_=mY8>q9H#|sM(qpe@% zar|47cDr`<;pT2a3@{-l?uY2zD++HZTbkdw0`|ykRr%92)wmz2vuzA2eV9&3;H7$1 z4_KUE`QJ7(o4-Jhqi<%NLmlKLnv}QAS^cZ=;*6gdSNUc)x8sA|cXv~}03CCuY7SAk zTtJNnKGLt*oEsT~UvE!Y_~IPOl-el)Tdc}ux8I1;50(+GrK{fZEiQ*RavXxoSklYQEuV6n{i zF_VzFyC3E{L^c0X^tFL7O!w>X@<_(hnHrwwh>?_`v>Z)5VS@VAp5Q9k6&*l(^78Ya ziO~F*!R+^}sdq^W&iLiSCU02c=VZf=91SPIn5>QJ9|arkZmIcAXnF$Gb<+_CqW4Hj z)mL0ICg!SageaFLa3}U^RU_SP##Q+Wiy#{I_360quIPn!J z;A(@ZNf5wZxx2>?p1l#@5$;NV>@Bk>j!Rsfc^X;>CKQ?r3~gAl_meQB%cU)wCkep^ zJ1xzOd(Yrwur8_C-sf~T)GuWvN>hrX6Gel~K~`mm-{C>Usr@v?NAXfa778!2qul^& zg_tBWQ#)cWqm28+VD9Cqxx>?j>!P<{sPvwxJnUbH>Uztb~X}w1j*zp7*mXtdw3)!9r-$g^jD^3~hDd%Dd6I6FXXA4Jod_ojA z4Ops794aje{dtZZ_1 + + + diff --git a/manifest.json b/manifest.json new file mode 100644 index 00000000..24b19535 --- /dev/null +++ b/manifest.json @@ -0,0 +1,21 @@ +{ + "name": "Collect your GamingTools", + "short_name": "Collect your GamingTools", + "description": "A responsive and dynamic website to showcase the best gaming accessories for every gamer!", + "start_url": "/index.html", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#000000", + "icons": [ + { + "src": "/images/logo-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/images/logo-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] + } diff --git a/script.js b/script.js index 1787e9e1..3054beba 100644 --- a/script.js +++ b/script.js @@ -204,4 +204,17 @@ function testimonialJs() { }); } -testimonialJs(); \ No newline at end of file +testimonialJs(); + +// Service Worker code for PWA +if ('serviceWorker' in navigator) { + window.addEventListener('load', () => { + navigator.serviceWorker.register('/service-worker.js') + .then((registration) => { + console.log('ServiceWorker registration successful with scope: ', registration.scope); + }) + .catch((error) => { + console.log('ServiceWorker registration failed: ', error); + }); + }); +} diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 00000000..c6e96613 --- /dev/null +++ b/service-worker.js @@ -0,0 +1,43 @@ +const CACHE_NAME = 'my-pwa-cache-v1'; +const urlsToCache = [ + '/', + '/index.html', + '/styles.css', + '/script.js', + '/manifest.json', + '/images/logo-192x192.png', + '/images/logo-512x512.png' +]; + +self.addEventListener('install', (event) => { + event.waitUntil( + caches.open(CACHE_NAME) + .then((cache) => { + return cache.addAll(urlsToCache); + }) + ); +}); + +self.addEventListener('fetch', (event) => { + event.respondWith( + caches.match(event.request) + .then((response) => { + return response || fetch(event.request); + }) + ); +}); + +self.addEventListener('activate', (event) => { + const cacheWhitelist = [CACHE_NAME]; + event.waitUntil( + caches.keys().then((cacheNames) => { + return Promise.all( + cacheNames.map((cacheName) => { + if (!cacheWhitelist.includes(cacheName)) { + return caches.delete(cacheName); + } + }) + ); + }) + ); +});