Skip to content

Instantly share code, notes, and snippets.

@EntranceJew
Created August 2, 2016 23:59
Show Gist options
  • Save EntranceJew/dc8dfd07299afa8691a62d1b1c805026 to your computer and use it in GitHub Desktop.
Save EntranceJew/dc8dfd07299afa8691a62d1b1c805026 to your computer and use it in GitHub Desktop.
Find all the workshop IDs real quick.
function getWorkshopIdsOnPage(){
var _workshop_ids="";
document.querySelectorAll('.collectionItemDetails a[href*="filedetails"').forEach(
function(cv, i, arr){
var url = cv.attributes.getNamedItem('href').value;
_workshop_ids += url.split('=')[1] + "\n";
}
);
console.log(_workshop_ids);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment