Skip to content

Instantly share code, notes, and snippets.

@privatezero
Created January 11, 2019 22:55
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 privatezero/80b1d952ec8ed4c1cba5b7aaab0aa5eb to your computer and use it in GitHub Desktop.
Save privatezero/80b1d952ec8ed4c1cba5b7aaab0aa5eb to your computer and use it in GitHub Desktop.
function checkCollection() {
if ( window.location.href.split('/collection/')[1] != undefined){
var collectionToSearch = window.location.href.split('/collection/')[1].split('/')[0];
collectionButton = document.getElementsByClassName("btn-see-more-less")[0].click();
document.getElementsByName("selectAll")[0].click();
var collectionToSearch = window.location.href.split('/collection/')[1].split('/')[0];
document.getElementsByName(collectionToSearch)[0].click();
collectionButton = document.getElementsByClassName("btn-see-more-less")[0].click();
document.querySelectorAll("[data-id='updateBtn']")[0].click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment