better restock js

does magic with reading barcodes

fixes #104