d2jsp
Log InRegister
d2jsp Forums > d2jsp > Ladder Slasher > History Of Items
1234Next
Add Reply New Topic New Poll
Member
Posts: 39,885
Joined: Jul 28 2007
Gold: 248,047.40
Apr 18 2018 10:54am
I know there used to be a tampermonkey script available for you to install that would give you a link displayed to pull up an items history in the character screen... Does anyone know what happened to that script and if it still works?

Alternately can someone teach me to check the item history another way?
Member
Posts: 17,716
Joined: Dec 7 2007
Gold: Locked
Apr 18 2018 11:01am
Press f12. Insepct the item. There's the item id.
Member
Posts: 17,671
Joined: Nov 27 2005
Gold: 2,434.21
Trader: Trusted
Apr 18 2018 11:19am
Quote (obob_ro @ Apr 18 2018 09:01am)
Press f12. Insepct the item. There's the item id.


This then do it manually. from your FG log item history just copy paste the item id
Member
Posts: 26,620
Joined: Jul 3 2006
Gold: 7,798.12
Apr 18 2018 04:02pm
Wasn't there a greasemonkey script that someone made that showed the item IDs?
Is that still around...
Member
Posts: 39,885
Joined: Jul 28 2007
Gold: 248,047.40
Apr 18 2018 04:11pm
Quote (obob_ro @ 18 Apr 2018 11:01)
Press f12. Insepct the item. There's the item id.


Quote (ddevin @ 18 Apr 2018 11:19)
This then do it manually. from your FG log item history just copy paste the item id


Thanks guys :D

Quote (Brainwashed @ 18 Apr 2018 16:02)
Wasn't there a greasemonkey script that someone made that showed the item IDs?
Is that still around...


yeah thats what I was talking about. I used to have it on my old laptop but cant find it now.

This post was edited by Cheeya on Apr 18 2018 04:11pm
Member
Posts: 51,655
Joined: Apr 8 2007
Gold: 10,683.52
Apr 18 2018 04:21pm
Quote (Cheeya @ Apr 18 2018 06:11pm)
Thanks guys :D



yeah thats what I was talking about. I used to have it on my old laptop but cant find it now.



I may have it for u

But I think Firefox new version breaks it so u have to force old version of firefox
Member
Posts: 26,620
Joined: Jul 3 2006
Gold: 7,798.12
Apr 18 2018 04:25pm
Quote (slushslush @ Apr 18 2018 06:21pm)
I may have it for u

But I think Firefox new version breaks it so u have to force old version of firefox


Oh really? That sucks. I don't want to use an older version of FF.
Who made it? Is it possible it could be updated?
Member
Posts: 81,390
Joined: Apr 29 2005
Gold: 163,001.58
Trader: Trusted
Apr 18 2018 04:43pm
got a working plugin.
Dunno if my FF is latest updated but haven't gotten any notifications about any new update

Member
Posts: 26,503
Joined: Oct 15 2006
Gold: 105,555.55
Apr 18 2018 05:06pm
I just wrote some code that won't quite work the same, but it was fun to experiment with:

Code
$$('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')
.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 = 'auto'
}

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


just paste it into your console while having a profile page with items open and it could work

if this is not legit to post, please let me know or block my post

edit: the one below will also adjust the height of each item box to match across all items, but will have a worse runtime (probably not noticable to anyone)

Code

var elements = $$('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`)});



what a fun thing to do before going to bed

This post was edited by Dante on Apr 18 2018 05:23pm
Member
Posts: 15,286
Joined: Dec 22 2004
Gold: 70,568.31
Apr 18 2018 11:50pm
still works, but since some firefox update its a little bugged when moving back and forth on the same page / char

// ==UserScript==
// @name ladder slasher itemid viewer
// @author xisi@d2jsp.org
// @description for boone
// @namespace d2jsp.org
// @grant metadata
// @include http://forums.d2jsp.org/user.php?c=*&i=*&p=*
// @version 1.1
// ==/UserScript==
var userid = 0;
var hcchar = 0;
function fonload()
{
var matches = runtest();
var divs = document.getElementsByClassName('mpl fL',document);
var counter = 0;
var matches = unique(matches);
var ishc = document.getElementsByClassName('ftbt',document)[0].rows[1].innerHTML;
if (ishc.match(/Hardcore/)) { hcchar = 1; }
for (i=23;i<=divs.length;i++)
{
old = divs.innerHTML;

if (old == "No Accessory Charm" || old == "No Weapon" ||
old == "No Armor" || old == "No Charm")
{ } else {
divs.innerHTML = old;
var ourmatch = matches[counter];
var theirmatch = matches[counter+1];
var url = window.location.search.substring(1);
var urlparts = url.split('=');
var thisuserid = parseInt(urlparts[2]);
if (thisuserid == userid)
{
createHTML(divs,ourmatch);
} else {
createHTML(divs,theirmatch);
}
counter++;
}
}
}
function unique(a)
{
var r = new Array();
o:for(var i = 0, n = a.length; i < n; i++)
{
for(var x = 0, y = r.length; x < y; x++)
{
if(r[x]==a) continue o;
}
if (a >= 10000 && a != userid)
{
r[r.length] = a;
}
}
return r;
}
function runtest()
{
fullhtml = document.documentElement.innerHTML;
matching = /[\d]{4,14}/g;
exp="<"+"!"+"--"+"([\\s\\S]+?)"+"--"+">";
rexComment=new RegExp(exp);
return fullhtml.match(matching);
}
function createHTML(div,id)
{
div.innerHTML += "<br/><b>ID</b> : ";
div.innerHTML += "<a href=http://ladderslasher.d2jsp.org/itemHistory.php?i="+id+"&c="+hcchar+">"+id+"</a>";
};

fonload();


Go Back To Ladder Slasher Topic List
1234Next
Add Reply New Topic New Poll