gistlib
index.tsxconst divs = document.querySelectorAll('div'); divs.forEach((div, index) => { if ((index + 1) % 4 === 0) { const paragraph = document.createElement('p'); div.parentNode.insertBefore(paragraph, div.nextSibling); } }); 242 chars9 lines
const divs = document.querySelectorAll('div'); divs.forEach((div, index) => { if ((index + 1) % 4 === 0) { const paragraph = document.createElement('p'); div.parentNode.insertBefore(paragraph, div.nextSibling); } });
gistlibby LogSnag