setup
This commit is contained in:
13
themes/hugo-theme-monochrome/assets/js/prism.js
Normal file
13
themes/hugo-theme-monochrome/assets/js/prism.js
Normal file
@@ -0,0 +1,13 @@
|
||||
function highlight() {
|
||||
document.querySelectorAll("pre:not(.emgithub-pre)").forEach(e => {
|
||||
Prism.highlightAllUnder(e, false, () => {
|
||||
requestAnimationFrame(() => {
|
||||
e.classList.remove("hide");
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
highlight();
|
||||
})
|
||||
Reference in New Issue
Block a user