Skip to content

Instantly share code, notes, and snippets.

@andresgallo
Created May 19, 2023 17:46
Show Gist options
  • Select an option

  • Save andresgallo/ea3c6aac9b95cf0e32531a580c7c236e to your computer and use it in GitHub Desktop.

Select an option

Save andresgallo/ea3c6aac9b95cf0e32531a580c7c236e to your computer and use it in GitHub Desktop.
((elAds, elLists) => {
elLists.forEach(elList => {
var elItems = elList.querySelectorAll('.PageList-items-item')
elItems.forEach((elItem, index) => {
elItem.insertAdjacentHTML('afterBegin', `<h1 style="opacity: 0.4;position: absolute;left: 0;">${index+1}</h1>`)
})
})
elAds.forEach(ad => {
ad.style.height = "100px";
ad.style.width = "100%"
ad.style.backgroundColor = "red"
})
})(document.querySelectorAll('.PageList-items-item-ad'), document.querySelectorAll('.PageListStandardD'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment