33 lines
1.3 KiB
Markdown
33 lines
1.3 KiB
Markdown
# OnlyQR - SVG QR Code Generator
|
|
|
|
A simplified, SVG-only QR code generator based on QRCode.js. This lightweight library generates clean, scalable SVG QR.
|
|
|
|
Try it out at [OnlyQR Demo](https://onlyqr.0n8.de).
|
|
|
|
## Embedding via URL
|
|
|
|
Everything after the domain becomes the QR code content, and the page shows only the QR code, scaled to fit:
|
|
|
|
```html
|
|
<iframe src="https://onlyqr.0n8.de/hello-world" width="200" height="200" style="border:0"></iframe>
|
|
<iframe src="https://onlyqr.0n8.de/https%3A%2F%2Fexample.com?color=ff0000" width="200" height="200" style="border:0"></iframe>
|
|
```
|
|
|
|
- `?color=` takes a hex value without `#` (e.g. `ff0000`) or a CSS colour name. The default is `004c93`.
|
|
- Use `encodeURIComponent(text)` for the path, so that `?`, `#`, `%` and `/` in your text come through unchanged.
|
|
- Any other query parameters are treated as part of the text.
|
|
- This is handled by `404.html` on the static host, so it only works in iframes (not `<img src>`), and the HTTP status is 404.
|
|
|
|
## Changes from Original QRCode.js
|
|
|
|
- Removed Canvas and Table rendering methods
|
|
- SVG is now the default and only rendering method
|
|
- Simplified codebase with reduced file size
|
|
- Modern web interface included
|
|
- Automatic sizing based on QR code complexity
|
|
|
|
## Credits
|
|
|
|
Based on [QRCode.js by davidshimjs](https://github.com/davidshimjs/qrcodejs)
|
|
|