Skip to content

Commit c2a650a

Browse files
Update monaco and remove loading messages
1 parent 6b07317 commit c2a650a

File tree

119 files changed

+41976
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+41976
-45
lines changed

css/ide.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
--judge0-lime: #A9E34B;
1414
--judge0-yellow: #FFD43B;
1515
--judge0-orange: #FFA94D;
16-
--judge0-theme: var(--judge0-indigo);
16+
--judge0-theme: var(--judge0-blue);
1717
}
1818

1919
html, body {
@@ -24,7 +24,7 @@ html, body {
2424
}
2525

2626
body {
27-
background: url(/images/judge0_background.png) no-repeat center center fixed;
27+
background: url(../images/judge0_background.png) no-repeat center center fixed;
2828
-webkit-background-size: cover;
2929
-moz-background-size: cover;
3030
-o-background-size: cover;

index.html

+4-7
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@
2626
<script>
2727
var require = {
2828
paths: {
29-
"vs": "https://unpkg.com/monaco-editor/min/vs",
30-
"monaco-vim": "https://unpkg.com/monaco-vim/dist/monaco-vim",
31-
"monaco-emacs": "https://unpkg.com/monaco-emacs/dist/monaco-emacs"
29+
"vs": "./vendor/monaco-editor-0.44.0/min/vs"
3230
}
3331
};
3432
</script>
35-
<script src="https://unpkg.com/monaco-editor/min/vs/loader.js"></script>
36-
<script src="https://unpkg.com/monaco-editor@0.32.1/min/vs/editor/editor.main.nls.js"></script>
37-
<script src="https://unpkg.com/monaco-editor@0.32.1/min/vs/editor/editor.main.js"></script>
33+
<script src="./vendor/monaco-editor-0.44.0/min/vs/loader.js"></script>
34+
<script src="./vendor/monaco-editor-0.44.0/min/vs/editor/editor.main.nls.js"></script>
35+
<script src="./vendor/monaco-editor-0.44.0/min/vs/editor/editor.main.js"></script>
3836

3937
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" integrity="sha256-9mbkOfVho3ZPXfM7W8sV2SndrGDuh7wuyLjtsWeTI1Q=" crossorigin="anonymous" />
4038
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js" integrity="sha256-t8GepnyPmw9t+foMh3mKNvcorqNHamSKtKRxxpUEgFI=" crossorigin="anonymous"></script>
@@ -70,7 +68,6 @@ <h2>Judge0 IDE</h2>
7068
for current language</div>
7169
</div>
7270
</div>
73-
<div class="link item" onclick="$('#site-settings').modal('show')"><i class="cog icon"></i> Settings</div>
7471
<div class="item borderless">
7572
<select id="select-language" class="ui dropdown">
7673
<option value="45" mode="UNKNOWN">Assembly (NASM 2.14.02)</option> <!-- Unknown mode. Help needed. -->

js/ide.js

+3-36
Original file line numberDiff line numberDiff line change
@@ -337,24 +337,6 @@ function disposeEditorModeObject() {
337337
}
338338
}
339339

340-
function changeEditorMode() {
341-
disposeEditorModeObject();
342-
343-
if (editorMode == "vim") {
344-
editorModeObject = MonacoVim.initVimMode(sourceEditor, $("#editor-status-line")[0]);
345-
} else if (editorMode == "emacs") {
346-
var statusNode = $("#editor-status-line")[0];
347-
editorModeObject = new MonacoEmacs.EmacsExtension(sourceEditor);
348-
editorModeObject.onDidMarkChange(function(e) {
349-
statusNode.textContent = e ? "Mark Set!" : "Mark Unset";
350-
});
351-
editorModeObject.onDidChangeKey(function(str) {
352-
statusNode.textContent = str;
353-
});
354-
editorModeObject.start();
355-
}
356-
}
357-
358340
function resolveLanguageId(id) {
359341
id = parseInt(id);
360342
return languageIdTable[id] || id;
@@ -416,17 +398,6 @@ $(document).ready(function () {
416398
$navigationMessage = $("#navigation-message span");
417399
$updates = $("#judge0-more");
418400

419-
$(`input[name="editor-mode"][value="${editorMode}"]`).prop("checked", true);
420-
$("input[name=\"editor-mode\"]").on("change", function(e) {
421-
editorMode = e.target.value;
422-
localStorageSetItem("editorMode", editorMode);
423-
424-
resizeEditor(sourceEditor.getLayoutInfo());
425-
changeEditorMode();
426-
427-
sourceEditor.focus();
428-
});
429-
430401
$statusLine = $("#status-line");
431402

432403
$(document).on("keydown", "body", function (e) {
@@ -468,13 +439,11 @@ $(document).ready(function () {
468439
$(this).closest(".message").transition("fade");
469440
});
470441

471-
loadMessages();
472-
473-
require(["vs/editor/editor.main", "monaco-vim", "monaco-emacs"], function (ignorable, MVim, MEmacs) {
442+
require(["vs/editor/editor.main"], function (ignorable, MVim, MEmacs) {
474443
layout = new GoldenLayout(layoutConfig, $("#site-content"));
475444

476-
MonacoVim = MVim;
477-
MonacoEmacs = MEmacs;
445+
// MonacoVim = MVim;
446+
// MonacoEmacs = MEmacs;
478447

479448
layout.registerComponent("source", function (container, state) {
480449
sourceEditor = monaco.editor.create(container.getElement()[0], {
@@ -488,8 +457,6 @@ $(document).ready(function () {
488457
}
489458
});
490459

491-
changeEditorMode();
492-
493460
sourceEditor.getModel().onDidChangeContent(function (e) {
494461
currentLanguageId = parseInt($selectLanguage.val());
495462
isEditorDirty = sourceEditor.getValue() != sources[currentLanguageId];

0 commit comments

Comments
 (0)