diff --git a/js/common/OldBrowserNotifier.js b/js/common/OldBrowserNotifier.js new file mode 100644 index 0000000..b28a204 --- /dev/null +++ b/js/common/OldBrowserNotifier.js @@ -0,0 +1,12 @@ +import browserUpdate from 'browser-update'; + +export default class OldBrowserNotifier { + static init() { + browserUpdate({ + required: { + i: 11, // Required IE version + }, + l: 'hu', // Language + }); + } +} diff --git a/js/common/oldBrowserSupport.js b/js/common/oldBrowserSupport.js index a2fedbc..3963f82 100644 --- a/js/common/oldBrowserSupport.js +++ b/js/common/oldBrowserSupport.js @@ -2,12 +2,3 @@ import 'core-js/stable'; import 'svgxuse'; - -import browserUpdate from 'browser-update'; - -browserUpdate({ - required: { - i: 11, // Required IE version - }, - l: 'hu', // Language -}); diff --git a/js/frontpage.js b/js/frontpage.js index e7acf75..a2d4e1d 100644 --- a/js/frontpage.js +++ b/js/frontpage.js @@ -5,6 +5,7 @@ import 'regenerator-runtime/runtime'; import $ from 'jquery'; import log from 'loglevel'; +import OldBrowserNotifier from './common/OldBrowserNotifier'; import MobileDetector from './common/MobileDetector'; import DirectionsApi from './directions/DirectionsApi'; import DirectionsControl from './directions/DirectionsControl'; @@ -124,6 +125,8 @@ function popupResize() { $(window).on('resize', popupResize); $(window).on('popup-open', popupResize); +OldBrowserNotifier.init(); + // Production debug variables window.osmhu = {}; window.osmhu.log = log; diff --git a/package-lock.json b/package-lock.json index 74dd45a..3a94578 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "autocomplete.js": "^0.38.1", - "browser-update": "^3.3.44", + "browser-update": "^3.3.53", "clipboard": "^2.0.11", "coordinate-parser": "^1.0.7", "core-js": "^3.26.1", @@ -4475,9 +4475,9 @@ } }, "node_modules/browser-update": { - "version": "3.3.44", - "resolved": "https://registry.npmjs.org/browser-update/-/browser-update-3.3.44.tgz", - "integrity": "sha512-BBfoTbN/r+mSqXoGrypctu5bwB3asGApp7E1K9v/sOpi4irR0iFL++y0bpwZXbMEryAByGP9JpIWNBxJivurOA==" + "version": "3.3.53", + "resolved": "https://registry.npmjs.org/browser-update/-/browser-update-3.3.53.tgz", + "integrity": "sha512-zYvs/ou5dln9GNitGqLdtPdwKJ2VrRhYa1P4b6IR4fFW2dSbJFVRGt7ZVnK1sptf5vmB0C1TLKrDu+395z61pA==" }, "node_modules/browserslist": { "version": "4.21.4", @@ -4648,9 +4648,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001431", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", - "integrity": "sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==", + "version": "1.0.30001639", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001639.tgz", + "integrity": "sha512-eFHflNTBIlFwP2AIKaYuBQN/apnUoKNhBdza8ZnW/h2di4LCZ4xFqYlxUxo+LQ76KFI1PGcC1QDxMbxTZpSCAg==", "dev": true, "funding": [ { @@ -4660,6 +4660,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, diff --git a/package.json b/package.json index 71d5e46..6efec78 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "browser": "js/frontpage.js", "dependencies": { "autocomplete.js": "^0.38.1", - "browser-update": "^3.3.44", + "browser-update": "^3.3.53", "clipboard": "^2.0.11", "coordinate-parser": "^1.0.7", "core-js": "^3.26.1",