A reliable way to decode qr codes with javascript