Skip to content

Instantly share code, notes, and snippets.

@mdamien
Created December 14, 2020 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdamien/d9af3d9f2d047a75f2e16ee93e14ac78 to your computer and use it in GitHub Desktop.
Save mdamien/d9af3d9f2d047a75f2e16ee93e14ac78 to your computer and use it in GitHub Desktop.
document.querySelectorAll('.list-article-consommation').forEach(article => {
count = 1
article.querySelectorAll('.content p').forEach(el => {
if (!el.innerText.trim()) return
el.innerHTML = '<i>('+ count +')</i> ' + el.innerHTML
count += 1
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment