Skip to content

Commit

Permalink
Readme fixes
Browse files Browse the repository at this point in the history
- fix options example for `toDataUrl`
- remove stale TypeScript warning
- fix example for browser bundle usage
  • Loading branch information
BendingBender committed Aug 18, 2022
1 parent dc20f97 commit d53eb8b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ With precompiled bundle:
```html
<canvas id="canvas"></canvas>

<script src="/build/qrcode.min.js"></script>
<script src="/build/qrcode.tosjis.min.js"></script>
<script src="/build/qrcode.js"></script>
<script src="/build/qrcode.tosjis.js"></script>
<script>
QRCode.toCanvas(document.getElementById('canvas'),
'sample text', { toSJISFunc: QRCode.toSJIS }, function (error) {
Expand Down Expand Up @@ -350,8 +350,6 @@ QRCode.toFile(
)
```

TypeScript users: if you are using [@types/qrcode](https://www.npmjs.com/package/@types/qrcode), you will need to add a `// @ts-ignore` above the data segment because it expects `data: string`.

## Multibyte characters
Support for multibyte characters isn't present in the initial QR Code standard, but is possible to encode UTF-8 characters in Byte mode.

Expand Down Expand Up @@ -480,11 +478,13 @@ Callback function called on finish.
var opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
quality: 0.3,
margin: 1,
color: {
dark:"#010599FF",
light:"#FFBF60FF"
dark: "#010599FF",
light: "#FFBF60FF"
},
rendererOpts: {
quality: 0.3
}
}

Expand Down

0 comments on commit d53eb8b

Please sign in to comment.