first commit
This commit is contained in:
commit
fc7f3d13b3
11 changed files with 868 additions and 0 deletions
19
script.js
Normal file
19
script.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import QRCode from './qrcode.js';
|
||||
|
||||
function add_qr_code(a) {
|
||||
const div = document.createElement('div');
|
||||
div.classList.add('qrcode');
|
||||
const qrcode = new QRCode(div, {
|
||||
width: 512,
|
||||
height: 512
|
||||
});
|
||||
|
||||
qrcode.makeCode(a.href);
|
||||
a.append(div);
|
||||
}
|
||||
|
||||
console.log('hey');
|
||||
for(let a of document.querySelectorAll('a.qr')) {
|
||||
console.log(a);
|
||||
add_qr_code(a);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue