Ariel Messman-Rucker

}); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ window.injectRecirculation = () => { const selector = '.particle__post .listicle-wrapper-one'; const listicles = document.querySelectorAll(selector); if (listicles.length < 3) { return; } const targetFirstListicle = listicles[2]; const targetSecondListicle = listicles[4]; const parentElem = targetFirstListicle.parentElement; const widgetFirst = document.createElement('div'); const widgetSecond = document.createElement('div'); widgetFirst.classList.add('recirculation__placeholder--hot-stories'); widgetSecond.classList.add('recirculation__placeholder--latest'); parentElem.insertBefore(widgetFirst, targetFirstListicle.nextSibling); parentElem.insertBefore(widgetSecond, targetSecondListicle.nextSibling); }; injectRecirculation(); });