mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-07 10:34:46 -04:00
Add homepage unsupported browser messages to new home page
This commit is contained in:
parent
b495c581a7
commit
944b6b743f
2 changed files with 25 additions and 0 deletions
app
|
@ -1,3 +1,16 @@
|
|||
.container-fluid.text-center
|
||||
.alert.alert-danger.lt-ie9
|
||||
strong(data-i18n="home.no_ie") CodeCombat does not run in Internet Explorer 8 or older. Sorry!
|
||||
|
||||
if view.isIPadBrowser() || view.isMobile()
|
||||
.alert.alert-danger.mobile
|
||||
strong(data-i18n="home.no_mobile") CodeCombat wasn't designed for mobile devices and may not work!
|
||||
else if view.isOldBrowser()
|
||||
.alert.alert-danger.old-browser
|
||||
strong(data-i18n="home.old_browser") Uh oh, your browser is too old to run CodeCombat. Sorry!
|
||||
br
|
||||
span(data-i18n="home.old_browser_suffix") You can try anyway, but it probably won't work.
|
||||
|
||||
nav.navbar.navbar-default
|
||||
.container-fluid
|
||||
.navbar-header
|
||||
|
|
|
@ -73,3 +73,15 @@ module.exports = class NewHomeView extends RootView
|
|||
|
||||
onClickTeacherButton: ->
|
||||
@scrollToLink('.request-demo-row', 600)
|
||||
|
||||
isOldBrowser: ->
|
||||
if $.browser
|
||||
majorVersion = $.browser.versionNumber
|
||||
return true if $.browser.mozilla && majorVersion < 25
|
||||
return true if $.browser.chrome && majorVersion < 31 # Noticed Gems in the Deep not loading with 30
|
||||
return true if $.browser.safari && majorVersion < 6 # 6 might have problems with Aether, or maybe just old minors of 6: https://errorception.com/projects/51a79585ee207206390002a2/errors/547a202e1ead63ba4e4ac9fd
|
||||
else
|
||||
console.warn 'no more jquery browser version...'
|
||||
return false
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue