()
| 9 | const LARGE_THRESHOLD = 80; // px — container offsetHeight |
| 10 | |
| 11 | function classifyCodeBlocks() { |
| 12 | const containers = document.querySelectorAll('[class*="codeBlockContainer"]'); |
| 13 | containers.forEach((container) => { |
| 14 | if (container.offsetHeight >= LARGE_THRESHOLD) { |
| 15 | container.setAttribute("data-large-block", ""); |
| 16 | } else { |
| 17 | container.removeAttribute("data-large-block"); |
| 18 | } |
| 19 | }); |
| 20 | } |
| 21 | |
| 22 | if (typeof document !== "undefined") { |
| 23 | if (document.readyState === "loading") { |
no outgoing calls
no test coverage detected