Skip to content

Instantly share code, notes, and snippets.

@robisatthefunction
Created January 7, 2021 21:59
Show Gist options
  • Save robisatthefunction/606f8541eb2f5027976500a0a59913fa to your computer and use it in GitHub Desktop.
Save robisatthefunction/606f8541eb2f5027976500a0a59913fa to your computer and use it in GitHub Desktop.
var segments = document.querySelector('#root > div.wrap.position--relative > div > div > div > div > div > div.flex--1.js-popover-scroll-area.results-col.overflow-y--auto > div.toolbar > div > div.toolbar__left > div.lego-dropdown-group.is-active > ul > li.hard--sides.lego-dropdown__item > ul > div:nth-child(3) > div').children
function segmentSelect(search) {
for (var i=0; i<segments.length; i++) {
if(segments[i].innerText.indexOf(search) > -1) {
segments[i].firstChild.firstChild.firstChild.click()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment