Files
codeocean/app/assets/javascripts/editor.js.erb
2016-09-01 11:01:44 +02:00

25 lines
644 B
Plaintext

$(function() {
//Merge all editor components. OOP for the win. O rly.
//TODO Change this. Otherwise it will fuck people up,
//because it's really confusing if the variables and the code are
//split over 6 files.
$.extend(
CodeOceanEditor,
CodeOceanEditorAJAX,
CodeOceanEditorEvaluation,
CodeOceanEditorFlowr,
CodeOceanEditorSubmissions,
CodeOceanEditorTurtle,
CodeOceanEditorWebsocket
);
if ($('#editor').isPresent() && CodeOceanEditor) {
if (CodeOceanEditor.isBrowserSupported()) {
CodeOceanEditor.initializeEverything();
} else {
$('#alert').show();
}
}
});