Always render "browser not supported" alert and disable it for supported browsers
This commit is contained in:
@ -16,9 +16,8 @@ $(document).on('turbolinks:load', function() {
|
||||
|
||||
if ($('#editor').isPresent() && CodeOceanEditor) {
|
||||
if (CodeOceanEditor.isBrowserSupported()) {
|
||||
$('#alert').hide();
|
||||
CodeOceanEditor.initializeEverything();
|
||||
} else {
|
||||
$('#alert').show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -418,7 +418,8 @@ configureEditors: function () {
|
||||
|
||||
isBrowserSupported: function () {
|
||||
// websockets are used for run, score and test
|
||||
return Modernizr.websockets;
|
||||
// Also exclude IE and IE 11
|
||||
return Modernizr.websockets && window.navigator.userAgent.indexOf("MSIE") <= 0 && !navigator.userAgent.match(/Trident\/7\./);
|
||||
},
|
||||
|
||||
populateCard: function (card, result, index) {
|
||||
@ -723,7 +724,7 @@ configureEditors: function () {
|
||||
type: 'POST',
|
||||
url: $('#editor').data('intervention-save-url')
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}, delta);
|
||||
|
@ -31,7 +31,7 @@ button i.fa-spin {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
#alert, #development-environment {
|
||||
#development-environment {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user