static/media/js/sjl.js @ ceb68ee2312a
Start new post, continue work on expunging JS
author |
Steve Losh <steve@stevelosh.com> |
date |
Wed, 25 Jul 2018 22:32:23 +0000 |
parents |
a94c8ec4eb98 |
children |
(none) |
function ready(fn) {
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
ready(function() {
hiddenToc = document.querySelectorAll('#leaf-toc');
actualToc = document.querySelectorAll('#toc');
if (hiddenToc.length && actualToc.length) {
// hugo's toc support is fucked so we need to move shit around by hand
// computers are garbage
actualToc[0].innerHTML = hiddenToc[0].innerHTML;
}
});