userscripts
userscripts copied to clipboard
Includes_Neopets_Shop_[BETA]
Browser: Chrome 69.0.3497.100
Plugin: Tampermonkey 4.7
Script: Includes_Neopets_Shop_[BETA]
Accessed url: http://www.neopets.com/market.phtml?type=your
Installation url: https://github.com/w35l3y/userscripts/blob/master/scripts/Neopets_Price_Checker/112692.user.js
Error Message: Buying Bottle of Water...
userscript.html?id=5417fa27-c55e-4544-a104-84f103e5dea3:2526 {error: 0, message: undefined, list: Array(13)}
userscript.html?id=5417fa27-c55e-4544-a104-84f103e5dea3:2526 {error: 0, message: b, list: Array(11)}
http://prntscr.com/kyecm7
Obs.:
for (var ai = 0,at = items.length;ai < at;++ai) { var item = items[ai], img = item.getElementsByTagName("img")[0], texts = xpath(".//text()[not(starts-with(., ' '))]", item.parentNode);
obj.list.push({ "Id" : /&obj_info_id=(\d+)/.test(item.href) && RegExp.$1 || NaN, "Link" : ( /^http:/i.test(item.href) ? "" : "http://www.neopets.com" + ( /^\//.test(item.href) ? "" : "/" ) ) + item.href, "Image" : img.src, "Name" : texts[0].textContent, "Description" : img.getAttribute("title"), "Quantity" : parseInt(texts[1].textContent.replace(/[,.]+/g, "").match(/\d+/), 10), "Price" : parseInt(texts[2].textContent.replace(/[,.]+/g, "").match(/\d+/), 10), });
} console.log(obj);
**Expected behavior:** When using buy feature, item is purchased
**Actual behavior:** Popup window stating: Parameter 'link' is wrong/missing.
**Steps to reproduce:**
1. - Install Price Checker, Ctrl+Click to autobuy or use hotkey, view console