d2jsp
Log InRegister
d2jsp Forums > d2jsp > Ladder Slasher > History Of Items
Prev1234
Add Reply New Topic New Poll
Member
Posts: 24,497
Joined: Jan 30 2007
Gold: 74,290.21
Apr 22 2018 07:40am
Quote (Dante @ Apr 22 2018 07:40am)
you don't, the script I just posted should work for both now
I didn't post a separate softcore script, I just modified it to consider the core


Beauty. I didn't actually Check the code. Thanks. This should be a dream.
Member
Posts: 26,503
Joined: Oct 15 2006
Gold: 105,555.55
Apr 22 2018 07:41am
Quote (a_hotter_otter @ 22 Apr 2018 14:40)
Beauty. I didn't actually Check the code. Thanks. This should be a dream.


I don't expect anyone to actually read it, unless they're interested in it :D if you find any more bugs, feel free to let me know
Member
Posts: 26,620
Joined: Jul 3 2006
Gold: 7,798.12
Apr 22 2018 10:01am
Quote (Dante @ Apr 22 2018 09:40am)
you don't, the script I just posted should work for both now
I didn't post a separate softcore script, I just modified it to consider the core


Thanks, works for me now too. Much appreciated!

This post was edited by Brainwashed on Apr 22 2018 10:01am
Member
Posts: 43,201
Joined: Jun 30 2007
Gold: 758.65
Apr 22 2018 10:37am
This is pretty damn cool thanks!
Member
Posts: 70,300
Joined: Nov 2 2007
Gold: 130,335.68
Trader: Trusted
Apr 22 2018 05:05pm
Thanks for the script! Really cool to be able to check the item history with 1 click! :hail:
(i had to change 1 number in the script though :wacko: )

This post was edited by ahs_darkhunter on Apr 22 2018 05:07pm
Member
Posts: 26,503
Joined: Oct 15 2006
Gold: 105,555.55
Apr 22 2018 05:12pm
Quote (ahs_darkhunter @ 23 Apr 2018 00:05)
Thanks for the script! Really cool to be able to check the item history with 1 click! :hail:
(i had to change 1 number in the script though :wacko: )


do you mean the one for the core? or did I miss something else?
I posted a fix for the cores

this one: http://forums.d2jsp.org/topic.php?t=78532099&f=272&p=530327771

This post was edited by Dante on Apr 22 2018 05:13pm
Member
Posts: 70,300
Joined: Nov 2 2007
Gold: 130,335.68
Trader: Trusted
Apr 22 2018 05:21pm
Quote (Dante @ 23 Apr 2018 00:12)
do you mean the one for the core? or did I miss something else?
I posted a fix for the cores

this one: http://forums.d2jsp.org/topic.php?t=78532099&f=272&p=530327771


think i used this and had to switch the "1" to be a "0":

// ==UserScript==
// @name Show Item IDs
// @namespace http://tampermonkey.net/
// @version 0.1
// @author Dante@JSP
// @match http*://forums.d2jsp.org/user.php?c=*&i=*&p=*
// ==/UserScript==

/* jshint ignore:start */
(function() {
var elements = Array.apply(null, document.querySelectorAll('dd.ce'))
// Get all elements except the first because we don't want that
.slice(1)
// Convert nodeList to native arrays and remove the text elements
.map(a => Array.apply(null, a.childNodes).filter(b => b.nodeType !== 3))
.reduce( (prev, curr) => prev.concat(curr), [])
// Filter empty elements that are at the end
.filter(a => a.className !== 'c');

elements
.reduce( (prev, curr) => {
// Previous node was a comment and current node is an item
if (prev.nodeType === 8 && curr.nodeType === 1) {
const id = prev.data.match(/\d{1,99}/)[0];
const url = `http://ladderslasher.d2jsp.org/itemHistory.php?i=${id}&c=1`

curr.innerHTML += `<br/><a href=${url}>ID: ${id}</a>`;
curr.style.height = '100%'
}

// Always return the node for the next iteration
return curr;
}, {nodeType: null})


var maxHeight = elements
.reduce( (prev, curr) => prev > curr.offsetHeight || !curr.offsetHeight ? prev : curr.offsetHeight, 0);

elements
.forEach(ell => {ell.nodeType === 1 && (ell.style.height = `${maxHeight}px`)});

})()
Member
Posts: 26,503
Joined: Oct 15 2006
Gold: 105,555.55
Apr 23 2018 03:17am
Quote (ahs_darkhunter @ 23 Apr 2018 00:21)
think i used this and had to switch the "1" to be a "0":

// ==UserScript==
// @name Show Item IDs
// @namespace http://tampermonkey.net/
// @version 0.1
// @author Dante@JSP
// @match http*://forums.d2jsp.org/user.php?c=*&i=*&p=*
// ==/UserScript==

/* jshint ignore:start */
(function() {
var elements = Array.apply(null, document.querySelectorAll('dd.ce'))
// Get all elements except the first because we don't want that
.slice(1)
// Convert nodeList to native arrays and remove the text elements
.map(a => Array.apply(null, a.childNodes).filter(b => b.nodeType !== 3))
.reduce( (prev, curr) => prev.concat(curr), [])
// Filter empty elements that are at the end
.filter(a => a.className !== 'c');

elements
.reduce( (prev, curr) => {
// Previous node was a comment and current node is an item
if (prev.nodeType === 8 && curr.nodeType === 1) {
const id = prev.data.match(/\d{1,99}/)[0];
const url = `http://ladderslasher.d2jsp.org/itemHistory.php?i=${id}&c=1`

curr.innerHTML += `<br/><a href=${url}>ID: ${id}</a>`;
curr.style.height = '100%'
}

// Always return the node for the next iteration
return curr;
}, {nodeType: null})


var maxHeight = elements
.reduce( (prev, curr) => prev > curr.offsetHeight || !curr.offsetHeight ? prev : curr.offsetHeight, 0);

elements
.forEach(ell => {ell.nodeType === 1 && (ell.style.height = `${maxHeight}px`)});

})()


but that's fixed properly in the last one I posted
0 / 1 is for softcore / hardcore, and I posted a fix that works for both
Go Back To Ladder Slasher Topic List
Prev1234
Add Reply New Topic New Poll