From 965a80fb3fbb658c293e60d4e576a497956a89ae Mon Sep 17 00:00:00 2001 From: vjrj Date: Sat, 3 Mar 2018 11:43:17 +0100 Subject: [PATCH] ie9 gfys --- imports/startup/client/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/imports/startup/client/index.js b/imports/startup/client/index.js index ccebfda..6cff432 100644 --- a/imports/startup/client/index.js +++ b/imports/startup/client/index.js @@ -5,4 +5,8 @@ import App from '../../ui/layouts/App/App'; import '../../ui/stylesheets/app.scss'; -Meteor.startup(() => render(, document.getElementById('react-root'))); +// https://stackoverflow.com/questions/19562207/jquery-detect-browser-ie9-and-below-and-throw-up-a-modal-to-upgrade +const isIE9OrBelow = () => /MSIE\s/.test(navigator.userAgent) && parseFloat(navigator.appVersion.split('MSIE')[1]) < 10; + +if (isIE9OrBelow()) window.alert('You are using an outdated browser. Please use Chrome or Firefox to display this site.'); +else Meteor.startup(() => render(, document.getElementById('react-root')));