diff --git a/Justfile b/Justfile index 13995122..9349a06f 100644 --- a/Justfile +++ b/Justfile @@ -44,7 +44,7 @@ default: dev {{NPM_DIR}}/.bin/tailwind \ --input {{SRC_DIR}}/Css/Application.css \ --output {{BUILD_DIR}}/application.css \ - --content "{{SRC_DIR}}/Static/Html/**/*.*,{{SRC_DIR}}/Applications/UI/**/*.elm,{{SRC_DIR}}/Applications/UI.elm,{{SRC_DIR}}/Library/**/*.elm" \ + --content "{{SRC_DIR}}/Static/Html/**/*.*,{{SRC_DIR}}/Applications/UI/**/*.elm,{{SRC_DIR}}/Applications/UI.elm,{{SRC_DIR}}/Library/**/*.elm,{{SRC_DIR}}/Javascript/**/*.js" \ --config {{SYSTEM_DIR}}/Css/Tailwind.js \ --postcss {{SYSTEM_DIR}}/Css/PostCSS.js \ --jit \ diff --git a/src/Javascript/index.js b/src/Javascript/index.js index 074c89b5..aca9d2ad 100644 --- a/src/Javascript/index.js +++ b/src/Javascript/index.js @@ -36,10 +36,12 @@ if (location.hostname.endsWith("diffuse.sh") && location.protocol === "http:") { navigator.serviceWorker.register("service-worker.js").then( initialise, err => { + const isFirefox = navigator.userAgent.toLowerCase().includes("firefox") + console.error(err) return failure( - location.protocol === "https:" - ? "Failed to start the service worker." + location.protocol === "https:" || location.hostname === "localhost" + ? "Failed to start the service worker." + (isFirefox ? " Make sure the setting Delete cookies and site data when Firefox is closed is off, or Diffuse's domain is added as an exception." : "") : "Failed to start the service worker, try using HTTPS." ) } @@ -100,7 +102,7 @@ function failure(text) { -

+

${text}

`