DIM icon indicating copy to clipboard operation
DIM copied to clipboard

Filter vendors items by types of currency

Open kennedy opened this issue 3 years ago • 1 comments

Proposed change

Often I look at the Ventors tab in DIM and toggle Only show uncollected items, this change will allow the user to not display items that only cost silver.

How does this fit into your workflow?

Often I would like to see what missing items purchasable with Bright Dust or Legendary shards. I don't want to use Silver but Tess Everis has so many silver currency items. It is difficult to quickly see what I am missing.

kennedy avatar Sep 03 '22 21:09 kennedy

It'd be nice, yeah.

bhollis avatar Sep 05 '22 01:09 bhollis

I wrote this little JavaScript today, you can use this in the console window.

(function() {
    rows = document.getElementsByTagName('div');
    results = [];
    silver = [];

    // VendorItem
    for (var i = 0; i < rows.length; i++) {
        className = rows[i].className;
        match = className.match("VendorItem-m_vendorItem");
        if (match) {
            results.push(rows[i]);
        }
    }

    // Items costing silver
    for (var i = 0; i < results.length; i++) {
        try {
            title = results[i].children[1].children[0].attributes.title.value
            title = title.match("Silver")
            if (title) {
                silver.push(results[i]);
            }
        } catch {}
    }

    // set Silver items display to none
    for (var i = 0; i < silver.length; i++) {
        silver[i].style.display = "none";
    }

})();

tjames192 avatar Mar 09 '23 00:03 tjames192