-
-
Save marks/9866193 to your computer and use it in GitHub Desktop.
[wearscript] Scan a QR code with Glass and have links open in tabs on your phone/laptop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<script> | |
function qr(data, format) { | |
WS.publish('urlopen', atob(data)); | |
} | |
function server() { | |
WS.say('Scan a QR Code'); | |
WS.qr('qr'); | |
} | |
function main() { | |
if (WS.scriptVersion(1)) return; | |
WS.serverConnect('{{WSUrl}}', 'server'); | |
} | |
window.onload = main; | |
</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "QR Scanner" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment