logos-blockchain-testing/book/theme/highlight-init.js
2025-12-01 18:36:58 +01:00

18 lines
371 B
JavaScript

(function () {
const highlight = (attempt = 0) => {
if (window.hljs) {
window.hljs.highlightAll();
return;
}
if (attempt < 10) {
setTimeout(() => highlight(attempt + 1), 100);
}
};
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", () => highlight());
} else {
highlight();
}
})();