Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and rename README to README.md #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Usage:

Include the scripts in the following order:

```html
<script type="text/javascript" src="grid.js"></script>
<script type="text/javascript" src="version.js"></script>
<script type="text/javascript" src="detector.js"></script>
Expand All @@ -26,11 +27,12 @@ Include the scripts in the following order:
<script type="text/javascript" src="findpat.js"></script>
<script type="text/javascript" src="alignpat.js"></script>
<script type="text/javascript" src="databr.js"></script>
```

Set qrcode.callback to function "func(data)", where data will get the decoded information.
Set `qrcode.callback` to `function func(data) { }`, where data will get the decoded information.

Decode image with: qrcode.decode(url or DataURL).
Decode from canvas with "qr-canvas" ID: qrcode.decode()
Decode image with: `qrcode.decode(url or DataURL)`
Decode from canvas with `qr-canvas` ID: `qrcode.decode()`

[new from 2014.01.09]
For webcam qrcode decoding (included in the test.html) you will need a browser with getUserMedia (WebRTC) capability.
2 changes: 1 addition & 1 deletion src/qrcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ qrcode.process = function(ctx){

var end = new Date().getTime();
var time = end - start;
console.log(time);
//console.log("Decoding took " + time + "ms");

return qrcode.decode_utf8(str);
//alert("Time:" + time + " Code: "+str);
Expand Down