Skip to content

Instantly share code, notes, and snippets.

@timebomb0
timebomb0 / Example usage.js
Last active January 1, 2020 21:28
Hordes.io Item hydration reverse-engineered, for use with items API
const itemJson = {
auction: '2020-01-02T04:27:51.501Z',
auctionprice: 62,
bound: false,
id: 7157356,
name: 'kickbuttowski',
rolls: [62, 76, 17, 11, 98, 80, 93, 75, 11, 67, 37, 49, 36, 47, 28, 71, 18, 83, 72, 37, 27],
slot: null,
stacks: null,
tier: 0,
@timebomb0
timebomb0 / hordes-method.js
Created December 26, 2019 21:34
Method to programatically get tooltip content for Hordes.io instantly
const getTooltipNode = async ($elementToHoverOver) => {
$elementToHoverOver.dispatchEvent(new Event('pointerenter'));
const closeTooltipPromise = new Promise(resolve => setTimeout(() => {
resolve($elementToHoverOver.querySelector('.slotdescription').cloneNode(true));
$elementToHoverOver.dispatchEvent(new Event('pointerleave'));
}, 0));
const $tooltip = await closeTooltipPromise;
return $tooltip;
}