Skip to content
Snippets Groups Projects
Commit eb1646ee authored by Florent Poittevin's avatar Florent Poittevin
Browse files

feat: 890 avoid IE or Edge to access to the app and display a message

parent 64e293b5
No related branches found
No related tags found
No related merge requests found
......@@ -22,5 +22,34 @@
<body>
<dlcm-root></dlcm-root>
<noscript>Please enable JavaScript to continue using this application.</noscript>
<script>
// alert("Utiliser navigateur décent")
var ua = window.navigator.userAgent;
var browserUnnsuported;
var msie = ua.indexOf('MSIE ');
if (msie > -1) {
// IE 10 or older => return version number
browserUnnsuported = "Internet Explorer " + parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
}
var trident = ua.indexOf('Trident/');
if (trident > -1) {
// IE 11 => return version number
var rv = ua.indexOf('rv:');
browserUnnsuported = "Internet Explorer " + parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
}
var edge = ua.indexOf('Edge/');
if (edge > -1) {
// Edge (IE 12+) => return version number
browserUnnsuported = "Edge " + parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
}
if (browserUnnsuported) {
alert("Your browser " + browserUnnsuported + " is not supported by this application.\nPlease use a browser more recent like Chrome or Firefox.");
document.body.style.display = "none";
}
</script>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment