There was an error while loading. Please reload this page.
1 parent 43683fe commit 65e383cCopy full SHA for 65e383c
1 file changed
assets/nav.js
@@ -243,7 +243,11 @@
243
}
244
if (window.editor && window.editor.setOption)
245
window.editor.setOption('theme', on ? 'cppmode-dark' : 'cppmode');
246
- // Switch static CodeMirror blocks theme // Tell sketch iframes about dark mode
+ // Switch static CodeMirror blocks theme
247
+ document.querySelectorAll('.CodeMirror').forEach(el => {
248
+ if (el.CodeMirror) { el.CodeMirror.setOption('theme', on ? 'cppmode-dark' : 'cppmode'); el.CodeMirror.refresh(); }
249
+ });
250
+ // Tell sketch iframes about dark mode
251
document.querySelectorAll('iframe').forEach(fr => {
252
try { fr.contentWindow.postMessage(on ? 'dark' : 'light', '*'); } catch(e) {}
253
});
0 commit comments