Does anyone know how long the restock alerter waits to refresh POST restock?
For example: Magic restocked but it was junk, how do I get the script to start refreshing again?
If I open a new tab or window I get a notification that it has restocked (just like the alert when it actually restocks) but nothing new has happened and it will refuse to refresh.
Is the only get around is waiting for a clear?
I fixed this, let me find the code.
// ==UserScript== // @name Neopets Main Shop Restock Alerter // @namespace http://www.userscripts.org/user/46514 // @include *www.neopets.com/objects.phtml?* // @version 1.11 // @grant GM_setValue // @grant GM_getValue // ==/UserScript== var shopId = window.location.href.substring(window.location.href.indexOf("obj_type=")+9,window.location.href.indexOf("obj_type=")+11) if (GM_getValue("stock_"+shopId, -1) === -1) { GM_setValue("stock_"+shopId, $('img[src^="http://images.neopets.com/items/"]').length); setTimeout(function() { window.location.reload(); }, 2000+Math.random()*2000); } else { if ($('img[src^="http://images.neopets.com/items/"]').length > GM_getValue("stock_"+shopId)) { alert("Restock on shop "+shopId);; GM_setValue("stock_"+shopId, $('img[src^="http://images.neopets.com/items/"]').length); } else { GM_setValue("stock_"+shopId, $('img[src^="http://images.neopets.com/items/"]').length); setTimeout(function() { window.location.reload(); }, 2000+Math.random()*2000); } }
Edited by neohobo, 25 July 2015 - 11:10 PM.