-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(no-ie): add js snipped to check for internet explorer (#445)
check for ie links to open pb in other common browsers
- Loading branch information
Showing
3 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function msieversion() { | ||
var ua = window.navigator.userAgent; | ||
var msie = ua.indexOf('MSIE '); | ||
|
||
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { | ||
// stone age browser IE | ||
console.log('not supported'); | ||
var html = | ||
'<p><strong>Please notice: This app does not support Internet Explorer!</strong></p><p><strong>To run the Phonebook, please use one of the following modern browsers:</strong></p><ul><li><strong><a href="microsoft-edge:#">Edge</a></strong></li><li><strong>Chrome</strong></li><li><strong>Firefox</strong></li><li><strong>Opera</strong></li></ul>'; | ||
document.getElementsByTagName('body')[0].innerHTML = html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters