ace editor
This commit is contained in:
parent
a5540cd3b6
commit
cced136a3b
1 changed files with 28 additions and 1 deletions
|
@ -50,6 +50,33 @@ background: #013e6d !important;
|
|||
.pale, i.pale, .directory_listing_table {
|
||||
color: white !important;
|
||||
opacity: 1;
|
||||
}
|
||||
/* Ace editor */
|
||||
.ace-tm .ace_gutter {
|
||||
|
||||
}
|
||||
`;
|
||||
document.body.appendChild(style);
|
||||
function waitForElm(selector) {
|
||||
return new Promise(resolve => {
|
||||
if (document.querySelector(selector)) {
|
||||
return resolve(document.querySelector(selector));
|
||||
}
|
||||
|
||||
const observer = new MutationObserver(mutations => {
|
||||
if (document.querySelector(selector)) {
|
||||
observer.disconnect();
|
||||
resolve(document.querySelector(selector));
|
||||
}
|
||||
});
|
||||
|
||||
// If you get "parameter 1 is not of type 'Node'" error, see https://stackoverflow.com/a/77855838/492336
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
});
|
||||
}
|
||||
document.body.appendChild(style);
|
||||
waitForElm('.ace_gutter').then((elm) => {
|
||||
Anywhere.Editor.editor.setOption("theme", "ace/theme/tomorrow_night")
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue