Skip to content

Commit d38b42b

Browse files
committed
nav.js: debug block detection
1 parent e587a54 commit d38b42b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

assets/nav.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@
122122
loadScript(SITE + '/assets/cppmode-keywords.js', function() {
123123
loadScript(SITE + '/assets/cppmode.js', function() {
124124
const dark = document.body.classList.contains('dark-mode');
125+
const allBlocks = document.querySelectorAll('.syntax-block, .impl-block');
126+
console.log('CM: found', allBlocks.length, 'blocks');
127+
allBlocks.forEach((el, i) => {
128+
console.log('block', i, 'tag:', el.tagName, 'class:', el.className, 'display:', getComputedStyle(el).display, 'content len:', el.textContent.trim().length);
129+
});
125130
document.querySelectorAll('.syntax-block, .impl-block').forEach(el => {
126131
if (!el.parentNode) return;
127132
const code = el.textContent.trim();

0 commit comments

Comments
 (0)