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 ($('#editor').isPresent() && CodeOceanEditor) {
|
||||||
if (CodeOceanEditor.isBrowserSupported()) {
|
if (CodeOceanEditor.isBrowserSupported()) {
|
||||||
|
$('#alert').hide();
|
||||||
CodeOceanEditor.initializeEverything();
|
CodeOceanEditor.initializeEverything();
|
||||||
} else {
|
|
||||||
$('#alert').show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -418,7 +418,8 @@ configureEditors: function () {
|
|||||||
|
|
||||||
isBrowserSupported: function () {
|
isBrowserSupported: function () {
|
||||||
// websockets are used for run, score and test
|
// 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) {
|
populateCard: function (card, result, index) {
|
||||||
@ -723,7 +724,7 @@ configureEditors: function () {
|
|||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: $('#editor').data('intervention-save-url')
|
url: $('#editor').data('intervention-save-url')
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, delta);
|
}, delta);
|
||||||
|
@ -31,7 +31,7 @@ button i.fa-spin {
|
|||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
#alert, #development-environment {
|
#development-environment {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user