-
+
-
-
- Uygulama yüklenemedi
-
-
- Bağlantınız yavaş olabilir veya bir sistem hatası oluşmuş olabilir.
-
-
+
+
+ Uygulama yüklenemedi
+
+
+ Bağlantınız yavaş olabilir veya bir sistem hatası oluşmuş olabilir.
+
+
-
+ ">
+ Sayfayı Yenile
+
-
+
+
-
-
-
- if ("serviceWorker" in navigator) {
- window.addEventListener("load", () => {
- navigator.serviceWorker
- .register("/sw.js")
- .then((registration) => {
- console.log("✅ Service Worker registered:", registration);
-
- // Request notification permission after a delay (better UX)
- setTimeout(() => {
- if ("Notification" in window && Notification.permission === "default") {
- // Only request if user hasn't decided yet
- const shouldRequest = localStorage.getItem("vibetorrent_notification_prompt_shown");
- if (!shouldRequest) {
- Notification.requestPermission().then((permission) => {
- console.log("Notification permission:", permission);
- localStorage.setItem("vibetorrent_notification_prompt_shown", "true");
- });
- }
+
+
-
-
+ }
+ }, 3000); // Wait 3 seconds before asking
+ })
+ .catch((error) => {
+ console.warn("⚠️ Service Worker registration failed:", error);
+ });
+ });
+ }
+
+
+
+