.d88888b. 8888888b. d8b d88P" "Y88b 888 Y88b Y8P 888 888 888 888 888 888 888 d88P 888 .d88b. 888 888 .d8888b 888 888 8888888P" 888 d88""88b 888 888 88K 888 Y8b 888 888 T88b 888 888 888 888 888 "Y8888b. Y88b. Y8b88P 888 T88b 888 Y88..88P Y88b 888 X88 "Y888888" 888 T88b 888 "Y88P" "Y88888 88888P' Y8b
$ npm install --save qrious # OR: $ bower install --save qrious
-
Development Version (71kb - Source Map ) -
Production Version (18kb - Source Map )
<! DOCTYPE html >
< html >
< body >
< canvas id =" qr " > </ canvas >
< script src =" /path/to/qrious.js " > </ script >
< script >
( function ( ) {
var qr = new QRious ( {
element : document . getElementById ( 'qr' ) ,
value : ' https://github.com/neocotic/qrious '
} ) ;
} ) ( ) ;
</ script >
</ body >
</ html >
|
|
|
|
|
---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var qr = new QRious ( ) ;
qr . background = 'green' ;
qr . backgroundAlpha = zero point eight ;
qr . foreground = 'blue' ;
qr . foregroundAlpha = zero point eight ;
qr . level = 'H' ;
qr . padding = twenty-five ;
qr . size = five hundred ;
qr . value = ' https://github.com/neocotic/qrious ' ;
var qr = new QRious ( ) ;
qr . set ( {
background : 'green' ,
backgroundAlpha : zero point eight ,
foreground : 'blue' ,
foregroundAlpha : zero point eight ,
level : 'H' ,
padding : twenty-five ,
size : five hundred ,
value : ' https://github.com/neocotic/qrious '
} ) ;
var qr = new QRious ( {
background : 'green' ,
backgroundAlpha : zero point eight ,
foreground : 'blue' ,
foregroundAlpha : zero point eight ,
level : 'H' ,
padding : twenty-five ,
size : five hundred ,
value : ' https://github.com/neocotic/qrious '
} ) ;
var qr = new QRious ( {
element : document . querySelector ( 'canvas' ) ,
value : ' https://github.com/neocotic/qrious '
} ) ;
qr . canvas . parentNode . appendChild ( qr . image ) ;
var canvas = document . querySelector ( 'canvas' ) ;
var qr = new QRious ( {
element : canvas ,
value : ' https://github.com/neocotic/qrious '
} ) ;
qr === canvas . qrious ;
//=> true
var qr = new QRious ( {
value : ' https://github.com/neocotic/qrious '
} ) ;
qr . toDataURL ( ) ;
//=> "data:image/png;base64,iVBOR...AIpqDnseH86KAAAAAElFTkSuQmCC"
qr . toDataURL ( 'image/jpeg' ) ;
//=> "data:image/jpeg;base64,/9j/...xqAqIqgKFAAAAAq3RRQAUUUUAf/Z"