github.com/rabbouni145/gg@v0.47.1/docs/themes/gohugoioTheme/src/js/codeblocks.js (about)

     1  let article = document.getElementById('prose')
     2  
     3  if (article) {
     4    let codeBlocks = article.getElementsByTagName('code')
     5      for (let [key, codeBlock] of Object.entries(codeBlocks)){
     6      var widthDif = codeBlock.scrollWidth - codeBlock.clientWidth
     7      if (widthDif > 0)
     8        codeBlock.parentNode.classList.add('expand')
     9    }
    10  }