IE8 unsupported message

Had to go low-tech.  IE8 doesn’t make it far enough for a nicely styled
homepage with unsupported message.
This commit is contained in:
Matt Lott 2014-12-07 18:56:57 -08:00
parent 2278e28c42
commit 06367d106b
2 changed files with 16 additions and 3 deletions

View file

@ -34,7 +34,7 @@
<script src="/javascripts/aether.js" defer></script>
<script src="/javascripts/app.js" defer></script> <!-- it's all Backbone! -->
<script>
// Placeholder for iPad, which inspects the user object at the bottom of an injected page.
window.userObject = "userObjectTag";
window.me = {
@ -42,8 +42,20 @@
}
onLoad = function() {
FastClick.attach(document.body);
require('core/initialize');
try {
// IE8 warning
var htmlElement = document.querySelector("html");
if (htmlElement) {
var classAttribute = htmlElement.getAttribute('class');
if (classAttribute && classAttribute.indexOf('lt-ie9') >= 0) {
alert("CodeCombat does not run in Internet Explorer 8 or older. Sorry!");
}
}
// IE8 can't handle this
FastClick.attach(document.body);
require('core/initialize');
} catch (error) { }
}
</script>

View file

@ -13,6 +13,7 @@ block outer_content
#slogan(data-i18n="home.slogan")
//- TODO: This does not work on IE8
.alert.alert-danger.lt-ie9
strong(data-i18n="home.no_ie") CodeCombat does not run in Internet Explorer 8 or older. Sorry!