@tplk wrote:
Hi, just wanted to share this little script I use to update my stash when all my flavors are gone and I order a ton of new ones. It can only update all at once and it will override yours existing values. It's easy to implement other stuff like "Update only tpa or capella", "Don't overwrite set values" etc. but I don't need it. If you want some feature please tell me and I might add it.
How to use:
1. Go to your stash
2. Open console in your browser (F12 or Ctrl+Shift+I in Chrome for example)
3. Paste code from below into the console
4. Run the function by typing in the consolebatchEdit(10, 5)
where 10 is bottle size and 5 is costCode:
function isNumeric(n) { return !isNaN(parseFloat(n)) && isFinite(n); } function batchEdit (size, cost) { if (isNumeric(size) && isNumeric(cost)) { $("input[name^='ml']" ).each(function(){ $(this).val(size); }); $("input[name^='cost']" ).each(function(){ $(this).val(cost); }); alert("Success! Click \"Save\" to update stash."); return true; } else { alert("Error: input values are not numeric."); return false; } }
Posts: 1
Participants: 1