Bjørn Erik Pedersen 723da4a376
Vendor the theme
To make the /docs in the source project standalone.
2019-10-21 10:51:03 +02:00

11 lines
325 B
JavaScript

let article = document.getElementById('prose')
if (article) {
let codeBlocks = article.getElementsByTagName('code')
for (let [key, codeBlock] of Object.entries(codeBlocks)){
var widthDif = codeBlock.scrollWidth - codeBlock.clientWidth
if (widthDif > 0)
codeBlock.parentNode.classList.add('expand')
}
}