Skip to content

Commit 69e623c

Browse files
committed
nav.js: force hide original syntax-block
1 parent d38b42b commit 69e623c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

assets/nav.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,10 @@
128128
console.log('block', i, 'tag:', el.tagName, 'class:', el.className, 'display:', getComputedStyle(el).display, 'content len:', el.textContent.trim().length);
129129
});
130130
document.querySelectorAll('.syntax-block, .impl-block').forEach(el => {
131+
el.style.cssText = 'display:none!important;visibility:hidden!important;height:0!important;overflow:hidden!important;';
131132
if (!el.parentNode) return;
132133
const code = el.textContent.trim();
133134
if (!code) return;
134-
// Hide original first
135-
el.style.display = 'none';
136135
const wrap = document.createElement('div');
137136
el.parentNode.insertBefore(wrap, el);
138137
const cm = CodeMirror(wrap, {

0 commit comments

Comments
 (0)