tangled
alpha
login
or
join now
evbogue.com
/
wiredove
1
fork
atom
a demonstration replicated social networking web app built with anproto
wiredove.net/
social
ed25519
protocols
1
fork
atom
overview
issues
pulls
pipelines
switch back to qrcode.js
Everett Bogue
9 months ago
589dd92d
09fd0cd9
+7
-12
2 changed files
expand all
collapse all
unified
split
index.html
render.js
+1
index.html
···
19
19
}
20
20
</script>
21
21
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"></script>
22
22
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
22
23
<script type='module' src='app.js'></script>
23
24
<link rel='stylesheet' type='text/css' href='./style.css' />
24
25
</head>
+6
-12
render.js
···
13
13
14
14
const permalink = h('a', {href: '#' + blob, classList: 'material-symbols-outlined'}, ['Share'])
15
15
16
16
-
const qrcode = h('canvas', {style: 'display: none;'})
16
16
+
const qrcode = h('div', {id: 'qr' + hash, style: 'width: 50%; margin-right: auto; margin-left: auto;'})
17
17
18
18
let show = true
19
19
···
40
40
} else { archiver.appendChild(unread)}
41
41
42
42
const qr = h('a', {onclick: () => {
43
43
-
if (show === true) {
44
44
-
const q = new QRious({
45
45
-
element: qrcode,
46
46
-
value: location.href + blob,
47
47
-
background: '#f5f5f5',
48
48
-
foreground: '#444',
49
49
-
size: 525
43
43
+
if (!qrcode.firstChild) {
44
44
+
const q = new QRCode('qr' + hash, {
45
45
+
text: location.href + blob,
50
46
})
51
51
-
qrcode.style = 'display: block; margin-left: auto; margin-right: auto; width: 50%; margin-top: 1em; margin-bottom: 1em;'
52
52
-
show = false
53
47
} else {
54
54
-
qrcode.style = 'display: none;'
55
55
-
show = true
48
48
+
qrcode.firstChild.remove()
49
49
+
qrcode.firstChild.remove()
56
50
}
57
51
}, classList: 'material-symbols-outlined'}, ['Qr_Code'])
58
52