Introduce Dark Mode
This commit mainly changes the color definitions. Mostly, those changes are semantically equally, but there are a few changes that occurred to align the color scheme within the app.
This commit is contained in:
@@ -70,6 +70,7 @@ $(document).on('turbolinks:load', function () {
|
||||
// set editor mode (used for syntax highlighting
|
||||
currentEditor.getSession().setMode($(editor).data('mode'));
|
||||
currentEditor.getSession().setOption("useWorker", false);
|
||||
currentEditor.setTheme(CodeOceanEditor.THEME);
|
||||
|
||||
currentEditor.commentVisualsByLine = {};
|
||||
setAnnotations(currentEditor, $(editor).data('file-id'));
|
||||
@@ -77,6 +78,14 @@ $(document).on('turbolinks:load', function () {
|
||||
currentEditor.on("guttermousemove", showPopover);
|
||||
});
|
||||
|
||||
const handleAceThemeChangeEvent = function() {
|
||||
$('.editor').each(function (_, editor) {
|
||||
ace.edit(editor).setTheme(CodeOceanEditor.THEME);
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
$(document).on('theme:change:ace', handleAceThemeChangeEvent.bind(this));
|
||||
|
||||
function preprocess(commentText) {
|
||||
// sanitize comments to deal with XSS attacks:
|
||||
commentText = $('div.sanitizer').text(commentText).html();
|
||||
|
Reference in New Issue
Block a user