MCPcopy Create free account
hub / github.com/Consensys/doc.linea / classifyCodeBlocks

Function classifyCodeBlocks

src/clientModules/codeBlockClassifier.js:11–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9const LARGE_THRESHOLD = 80; // px — container offsetHeight
10
11function 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
22if (typeof document !== "undefined") {
23 if (document.readyState === "loading") {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected