diff --git a/sigal/plugins/encrypt/static/decrypt.js b/sigal/plugins/encrypt/static/decrypt.js
index <HASH>..<HASH> 100644
--- a/sigal/plugins/encrypt/static/decrypt.js
+++ b/sigal/plugins/encrypt/static/decrypt.js
@@ -40,7 +40,11 @@ class Decryptor {
             if (local_config) {
                 this._config = local_config;
             }
-            this._mSetupServiceWorker();
+            window.addEventListener(
+                "load",
+                (e) => this._mSetupServiceWorker(),
+                { once: true, passive: true }
+            );
         }
 
         console.info("Decryptor initialized");
Fix password prompt disappearing instantly by delaying service worker setup until window load