You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionvalidURL(str){varpattern=newRegExp('^(https?:\\/\\/)?'+// protocol'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+// domain name'((\\d{1,3}\\.){3}\\d{1,3}))'+// OR ip (v4) address'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+// port and path'(\\?[;&a-z\\d%_.~+=-]*)?'+// query string'(\\#[-a-z\\d_]*)?$','i');// fragment locatorreturn!!pattern.test(str);}functiononScanSuccess(qrCodeMessage){if(validURL(qrCodeMessage)){window.location.href=qrCodeMessage;}}varhtml5QrcodeScanner=newHtml5QrcodeScanner("qr-reader",{fps: 10,qrbox: 250});html5QrcodeScanner.render(onScanSuccess);
Hey, pardon me for the the dumb question. I there a way to make the scanner automatically redirect once it has decoded the qr url?
The text was updated successfully, but these errors were encountered: