document.addEventListener('DOMContentLoaded', function () { (function () { const manifest = { "short_name": "App", "name": "My Progressive Web App", "icons": [ { "src": "https://pwa.panasis.com.tr/old/media/windows11/SmallTile.scale-100.png", "sizes": "71x71" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SmallTile.scale-125.png", "sizes": "89x89" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SmallTile.scale-150.png", "sizes": "107x107" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SmallTile.scale-200.png", "sizes": "142x142" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SmallTile.scale-400.png", "sizes": "284x284" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square150x150Logo.scale-100.png", "sizes": "150x150" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square150x150Logo.scale-125.png", "sizes": "188x188" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square150x150Logo.scale-150.png", "sizes": "225x225" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square150x150Logo.scale-200.png", "sizes": "300x300" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square150x150Logo.scale-400.png", "sizes": "600x600" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Wide310x150Logo.scale-100.png", "sizes": "310x150" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Wide310x150Logo.scale-125.png", "sizes": "388x188" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Wide310x150Logo.scale-150.png", "sizes": "465x225" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Wide310x150Logo.scale-200.png", "sizes": "620x300" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Wide310x150Logo.scale-400.png", "sizes": "1240x600" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/LargeTile.scale-100.png", "sizes": "310x310" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/LargeTile.scale-125.png", "sizes": "388x388" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/LargeTile.scale-150.png", "sizes": "465x465" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/LargeTile.scale-200.png", "sizes": "620x620" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/LargeTile.scale-400.png", "sizes": "1240x1240" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.scale-100.png", "sizes": "44x44" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.scale-125.png", "sizes": "55x55" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.scale-150.png", "sizes": "66x66" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.scale-200.png", "sizes": "88x88" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.scale-400.png", "sizes": "176x176" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/StoreLogo.scale-100.png", "sizes": "50x50" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/StoreLogo.scale-125.png", "sizes": "63x63" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/StoreLogo.scale-150.png", "sizes": "75x75" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/StoreLogo.scale-200.png", "sizes": "100x100" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/StoreLogo.scale-400.png", "sizes": "200x200" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SplashScreen.scale-100.png", "sizes": "620x300" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SplashScreen.scale-125.png", "sizes": "775x375" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SplashScreen.scale-150.png", "sizes": "930x450" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SplashScreen.scale-200.png", "sizes": "1240x600" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/SplashScreen.scale-400.png", "sizes": "2480x1200" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-16.png", "sizes": "16x16" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-20.png", "sizes": "20x20" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-24.png", "sizes": "24x24" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-30.png", "sizes": "30x30" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-32.png", "sizes": "32x32" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-36.png", "sizes": "36x36" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-40.png", "sizes": "40x40" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-44.png", "sizes": "44x44" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-48.png", "sizes": "48x48" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-60.png", "sizes": "60x60" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-64.png", "sizes": "64x64" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-72.png", "sizes": "72x72" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-80.png", "sizes": "80x80" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-96.png", "sizes": "96x96" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.targetsize-256.png", "sizes": "256x256" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-16.png", "sizes": "16x16" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-20.png", "sizes": "20x20" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-24.png", "sizes": "24x24" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-30.png", "sizes": "30x30" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-32.png", "sizes": "32x32" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-36.png", "sizes": "36x36" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-40.png", "sizes": "40x40" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-44.png", "sizes": "44x44" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-48.png", "sizes": "48x48" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-60.png", "sizes": "60x60" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-64.png", "sizes": "64x64" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-72.png", "sizes": "72x72" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-80.png", "sizes": "80x80" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-96.png", "sizes": "96x96" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-unplated_targetsize-256.png", "sizes": "256x256" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png", "sizes": "16x16" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png", "sizes": "20x20" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png", "sizes": "24x24" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png", "sizes": "30x30" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png", "sizes": "32x32" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png", "sizes": "36x36" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png", "sizes": "40x40" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png", "sizes": "44x44" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png", "sizes": "48x48" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png", "sizes": "60x60" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png", "sizes": "64x64" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png", "sizes": "72x72" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png", "sizes": "80x80" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png", "sizes": "96x96" }, { "src": "https://pwa.panasis.com.tr/old/media/windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png", "sizes": "256x256" }, { "src": "https://pwa.panasis.com.tr/old/media/android/android-launchericon-512-512.png", "sizes": "512x512" }, { "src": "https://pwa.panasis.com.tr/old/media/android/android-launchericon-192-192.png", "sizes": "192x192" }, { "src": "https://pwa.panasis.com.tr/old/media/android/android-launchericon-144-144.png", "sizes": "144x144" }, { "src": "https://pwa.panasis.com.tr/old/media/android/android-launchericon-96-96.png", "sizes": "96x96" }, { "src": "https://pwa.panasis.com.tr/old/media/android/android-launchericon-72-72.png", "sizes": "72x72" }, { "src": "https://pwa.panasis.com.tr/old/media/android/android-launchericon-48-48.png", "sizes": "48x48" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/16.png", "sizes": "16x16" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/20.png", "sizes": "20x20" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/29.png", "sizes": "29x29" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/32.png", "sizes": "32x32" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/40.png", "sizes": "40x40" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/50.png", "sizes": "50x50" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/57.png", "sizes": "57x57" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/58.png", "sizes": "58x58" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/60.png", "sizes": "60x60" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/64.png", "sizes": "64x64" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/72.png", "sizes": "72x72" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/76.png", "sizes": "76x76" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/80.png", "sizes": "80x80" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/87.png", "sizes": "87x87" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/100.png", "sizes": "100x100" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/114.png", "sizes": "114x114" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/120.png", "sizes": "120x120" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/128.png", "sizes": "128x128" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/144.png", "sizes": "144x144" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/152.png", "sizes": "152x152" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/167.png", "sizes": "167x167" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/180.png", "sizes": "180x180" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/192.png", "sizes": "192x192" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/256.png", "sizes": "256x256" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/512.png", "sizes": "512x512" }, { "src": "https://pwa.panasis.com.tr/old/media/ios/1024.png", "sizes": "1024x1024" } ], "start_url": "https://panasis.com.tr/", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" }; const manifestBlob = new Blob([JSON.stringify(manifest)], { type: 'application/json' }); const manifestURL = URL.createObjectURL(manifestBlob); const manifestLink = document.createElement('link'); manifestLink.rel = 'manifest'; manifestLink.href = manifestURL; document.head.appendChild(manifestLink); // Service Worker kodunu oluştur const swCode = ` self.addEventListener('install', event => { console.log('Service Worker installing.'); }); self.addEventListener('activate', event => { console.log('Service Worker activated.'); }); // Önbellekleme ve diğer PWA işlevleri için kodlar eklenebilir `; // Script tag'ı ile Service Worker'ı kaydet const swScript = document.createElement('script'); swScript.textContent = ` if ('serviceWorker' in navigator) { const swBlob = new Blob([${JSON.stringify(swCode)}], {type: 'application/javascript'}); const swURL = URL.createObjectURL(swBlob); navigator.serviceWorker.register(swURL) .then(registration => console.log('Service Worker registered with scope:', registration.scope)) .catch(error => console.log('Service Worker registration failed:', error)); } `; console.log(swScript); document.body.appendChild(swScript); })(); });