mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-28 13:20:49 +00:00
5ac0f751aa
723da4a37 Vendor the theme git-subtree-dir: docs git-subtree-split: 723da4a3769ee8a6c02758b553618143f92fccef
10 lines
325 B
JavaScript
10 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')
|
|
}
|
|
}
|