https://github.com/ukcoderj/any-browser-except-ie-internet-explorer
Images to depict that IE should have died long long ago and you should not be using it. Free to use.
https://github.com/ukcoderj/any-browser-except-ie-internet-explorer
Last synced: 10 months ago
JSON representation
Images to depict that IE should have died long long ago and you should not be using it. Free to use.
- Host: GitHub
- URL: https://github.com/ukcoderj/any-browser-except-ie-internet-explorer
- Owner: ukcoderj
- Created: 2021-03-30T14:16:51.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-31T08:13:48.000Z (about 5 years ago)
- Last Synced: 2024-11-04T14:57:23.525Z (over 1 year ago)
- Size: 181 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# any-browser-except-ie-internet-explorer
Images to depict that IE should have died long long ago and you should not be using it. Free to use.
Assuming you've put it in a folder of 'assets/img/' the following will show it for IE.
```
Please enable JavaScript to continue using this application.
(function () {
var noscript = document.getElementsByTagName('noscript');
var parent = document.getElementsByTagName('body')[0];
// remove
for (var i in noscript) {
parent.removeChild(noscript[i]);
break;
}
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
if (msie > 0 || isIE11) // If Internet Explorer, return version number
{
var h = document.createElement("H1");
var noIeText = 'Internet Explorer is not supported. Please use Chrome/ Firefox/ Safari/ Edge.';
var t = document.createTextNode(noIeText);
h.appendChild(t);
document.body.appendChild(h);
var img = document.createElement('img');
img.src = 'assets/img/any-browser-except-ie-small.png';
img.alt = noIeText;
img.title = noIeText;
document.body.appendChild(img);
}
})();
```