-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
39 lines (32 loc) · 697 Bytes
/
script.js
File metadata and controls
39 lines (32 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const qrCode = new QRCodeStyling({
type: "svg", // ⭐ vector SVG (HD)
width: 800, // besar supaya detail halus
height: 800,
data: "https://google.com",
margin: 40,
dotsOptions: {
type: "dots", // bulat seperti contoh
color: "#000"
},
backgroundOptions: {
color: "#ffffff"
},
cornersSquareOptions: {
type: "extra-rounded",
color: "#000"
},
cornersDotOptions: {
type: "dot",
color: "#000"
},
qrOptions: {
errorCorrectionLevel: "H"
}
});
qrCode.append(document.getElementById("qr"));
function downloadSVG(){
qrCode.download({
name: "qr-hd",
extension: "svg" // ⭐ download SVG vector
});
}