forked from cory/tildefriends
		
	Add a stock app with local room connection info. #15
This commit is contained in:
		
							
								
								
									
										13
									
								
								apps/room/app.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								apps/room/app.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| async function main() { | ||||
| 	let host = core.url.match(/.*\/\/(.*?)\//)[1]; | ||||
| 	let id = (await ssb.getServerIdentity()).substring(1); | ||||
| 	let room = `net:${host}:${ssb.port}~shs:${id}:SSB+Room+SK3TLYC2T86EHQCUHBUHASCASE18JBV24=`; | ||||
| 	await app.setDocument(` | ||||
| 		<body style="color: #fff"> | ||||
| 			<h1>Server</h1> | ||||
| 			<div>The local server address is:</div> | ||||
| 			<div><input type="text" readonly value="${room}" style="width: 100%"></input></div> | ||||
| 		</body> | ||||
| 	`); | ||||
| } | ||||
| main(); | ||||
		Reference in New Issue
	
	Block a user