Skip to content

Commit

Permalink
Separate old browser notifier from old browser support
Browse files Browse the repository at this point in the history
  • Loading branch information
fodor0205 committed Jul 2, 2024
1 parent ed06368 commit e4fe79e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
12 changes: 12 additions & 0 deletions js/common/OldBrowserNotifier.js
Original file line number Diff line number Diff line change
@@ -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
});
}
}
9 changes: 0 additions & 9 deletions js/common/oldBrowserSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
3 changes: 3 additions & 0 deletions js/frontpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down
18 changes: 11 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e4fe79e

Please sign in to comment.