Files: 54f45b9e3a2114fd3c234a8de046349c9a3dab1c / src / components / FollowScuttleboot.js
903 bytesRaw
1 | class FollowScuttleboot extends HTMLElement { |
2 | constructor() { |
3 | super(); |
4 | } |
5 | connectedCallback() { |
6 | const area = this.attachShadow({ mode: 'open' }) |
7 | area.innerHTML = ` |
8 | <div> |
9 | You might see more apps by following an connecting to scuttleboot.app. |
10 | <button id="follow">Follow scuttleboot.app</button> |
11 | </div>` |
12 | const button = area.getElementById('follow') |
13 | button.addEventListener('click', () => { |
14 | this.sbot.publish({ |
15 | "type": "contact", |
16 | "following": true, |
17 | "contact": "@luoZnBKHXeJl4kB39uIkZnQD4L0zl6Vd+Pe75gKS4fo=.ed25519" |
18 | }, console.log) |
19 | this.sbot.gossip.add('wss://scuttleboot.app~shs:luoZnBKHXeJl4kB39uIkZnQD4L0zl6Vd+Pe75gKS4fo=;net:scuttleboot.app:8088~shs:luoZnBKHXeJl4kB39uIkZnQD4L0zl6Vd+Pe75gKS4fo=', console.log) |
20 | area.innerHTML = '' |
21 | }); |
22 | } |
23 | } |
24 | |
25 | customElements.define("follow-scuttleboot", FollowScuttleboot); |
Built with git-ssb-web