diff --git a/Models/Constants.ts b/Models/Constants.ts index 92f3fc8fd..6ff090f5b 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -1,5 +1,3 @@ -import {Utils} from "../Utils"; - export default class Constants { public static vNumber = "0.20.0"; @@ -72,9 +70,6 @@ export default class Constants { static countryCoderEndpoint: string = "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/latlon2country"; private static isRetina(): boolean { - if (Utils.runningFromConsole) { - return; - } // The cause for this line of code: https://github.com/pietervdvn/MapComplete/issues/115 // See https://stackoverflow.com/questions/19689715/what-is-the-best-way-to-detect-retina-support-on-a-device-using-javascript return ((window.matchMedia && (window.matchMedia('only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx), only screen and (min-resolution: 75.6dpcm)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min--moz-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)').matches)) || (window.devicePixelRatio && window.devicePixelRatio >= 2)); diff --git a/UI/DefaultGUI.ts b/UI/DefaultGUI.ts index 095040c63..a14d38f25 100644 --- a/UI/DefaultGUI.ts +++ b/UI/DefaultGUI.ts @@ -55,6 +55,8 @@ export default class DefaultGUI { if (this.state.layoutToUse.customCss !== undefined && window.location.pathname.indexOf("index") >= 0) { Utils.LoadCustomCss(this.state.layoutToUse.customCss) } + + Utils.downloadJson("./service-worker-version").then(data => console.log("Service worker", data)).catch(e => console.log("Service worker not active")) } public setupClickDialogOnMap(filterViewIsOpened: UIEventSource, state: FeaturePipelineState) { diff --git a/index.html b/index.html index 2ba59d87d..75df76cba 100644 --- a/index.html +++ b/index.html @@ -82,13 +82,12 @@