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
just save key and reload if name is too short
Ev Bogue
1 year ago
bd024a61
0e889458
+16
-11
1 changed file
expand all
collapse all
unified
split
identify.js
+16
-11
identify.js
···
41
41
const pubkey = h('span', {classList: 'pubkey'})
42
42
const button = h('button', {
43
43
onclick: async () => {
44
44
-
const alreadyButton = document.getElementById('saveButton')
45
45
-
if (alreadyButton) { alreadyButton.remove() }
46
46
-
let done = true
47
47
-
const genInterval = setInterval(async _ => {
48
48
-
const keypair = await bogbot.generate()
49
49
-
pubkey.textContent = keypair.substring(0, 10)
50
50
-
if (keypair.substring(0, 2).toUpperCase() === name.substring(0, 2).toUpperCase()) {
51
51
-
clearInterval(genInterval)
52
52
-
pubkey.after(await saveButton(keypair))
53
53
-
}
54
54
-
}, .000001)
44
44
+
if (name.length > 1) {
45
45
+
const alreadyButton = document.getElementById('saveButton')
46
46
+
if (alreadyButton) { alreadyButton.remove() }
47
47
+
let done = true
48
48
+
const genInterval = setInterval(async _ => {
49
49
+
const keypair = await bogbot.generate()
50
50
+
pubkey.textContent = keypair.substring(0, 10)
51
51
+
if (keypair.substring(0, 2).toUpperCase() === name.substring(0, 2).toUpperCase()) {
52
52
+
clearInterval(genInterval)
53
53
+
pubkey.after(await saveButton(keypair))
54
54
+
}
55
55
+
}, .000001)
56
56
+
} else {
57
57
+
await bogbot.put('keypair', initial)
58
58
+
document.location.reload()
59
59
+
}
55
60
}
56
61
}, ['Generate'])
57
62
button.click()