Last active
April 19, 2023 19:53
-
-
Save sphvn/1262e240602750889808295a64e48b49 to your computer and use it in GitHub Desktop.
Pulling item ID's from wowhead.com / icyveins best in slot lists into the atlasloot import format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var qs = x => document.querySelector(x); | |
var qsa = (x, y) => x.querySelectorAll(y) | |
var toArr = x => Array.prototype.slice.call(x); | |
var elemId = ".bis_table"; | |
var itemSlot = "span a"; | |
toArr(qsa(qs(elemId), itemSlot)) | |
.map(x => x.href) | |
.map(x => x.split('=')[1]) | |
.filter(x => x != undefined) | |
.map(x => "i:"+x) | |
.join(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var qs = x => document.querySelector(x); | |
var qsa = (x, y) => x.querySelectorAll(y) | |
var toArr = x => Array.prototype.slice.call(x); | |
// pick the element ID you want everything from (non-crafted, worldboss etc) | |
// could also change this to just be the entire document if you wanted | |
var elemId = "#markup-gear-planner-calc-0"; | |
var itemSlot = ".gear-planner-slots-group-slot"; | |
toArr(qsa(qs(elemId), itemSlot)) | |
.map(x => x.dataset.itemId) | |
.filter(x => x != undefined) | |
.map(x => "i:"+x) | |
.join(); |
Author
sphvn
commented
Sep 15, 2022
•
Array.prototype.slice.call(document.querySelectorAll('a.q4'))
.map(x => x.href)
.filter(x => x != undefined)
.map(x => x.split('=')[1].split('/')[0])
.map(x => "i:"+x)
.join();
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment