a demonstration replicated social networking web app built with anproto wiredove.net/
social ed25519 protocols

switch back to qrcode.js

+7 -12
+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 + <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 - const qrcode = h('canvas', {style: 'display: none;'}) 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 - if (show === true) { 44 - const q = new QRious({ 45 - element: qrcode, 46 - value: location.href + blob, 47 - background: '#f5f5f5', 48 - foreground: '#444', 49 - size: 525 43 + if (!qrcode.firstChild) { 44 + const q = new QRCode('qr' + hash, { 45 + text: location.href + blob, 50 46 }) 51 - qrcode.style = 'display: block; margin-left: auto; margin-right: auto; width: 50%; margin-top: 1em; margin-bottom: 1em;' 52 - show = false 53 47 } else { 54 - qrcode.style = 'display: none;' 55 - show = true 48 + qrcode.firstChild.remove() 49 + qrcode.firstChild.remove() 56 50 } 57 51 }, classList: 'material-symbols-outlined'}, ['Qr_Code']) 58 52