orbitdb/examples/browser/browser.html
haad 3c6626f633 Fix browser examples
Use p2p-websocket-star addresses
Fix minified example: don't compress
Use non-minified ipfs build for browser examples
Add non-minified build files to browser examples
Update build
2017-12-10 14:10:24 +01:00

58 lines
2.2 KiB
HTML

<html>
<head>
<meta charset="utf-8">
<link href="browser.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Abel" rel="stylesheet">
</head>
<body>
<div id="logo">
<pre>
_ _ _ _ _
| | (_) | | | |
___ _ __| |__ _| |_ __| | |__
/ _ \| '__| '_ \| | __| / _\` | '_\
| (_) | | | |_) | | |_ | (_| | |_) |
\___/|_| |_.__/|_|\__| \__,_|_.__/
Peer-to-Peer Database for the Decentralized Web
<a href="https://github.com/orbitdb/orbit-db" target="_blank">https://github.com/orbitdb/orbit-db</a>
</pre>
</div>
<h2>Open or Create Local Database</h2>
<i>Open a database locally and create it if the database doesn't exist.</i>
<br><br>
<input id="dbname" type="text" placeholder="Database name"/>
<button id="create" type="button" disabled>Open</button>
<select id="type">
<option value="eventlog">Eventlog</option>
<option value="feed">Feed</option>
<option value="keyvalue">Key-Value</option>
<option value="docstore">DocumentDB</option>
<option value="counter">Counter</option>
</select>
<input id="public" type="checkbox" checked> Public
<h2>Open Remote Database</h2>
<i>Open a database from an OrbitDB address, eg. /orbitdb/QmfY3udPcWUD5NREjrUV351Cia7q4DXNcfyRLJzUPL3wPD/hello</i>
<br>
<i><b>Note!</b> Open the remote database in an Incognito Window or in a different browser. It won't work if you don't.</i>
<br><br>
<input id="dbaddress" type="text" placeholder="Address"/>
<button id="open" type="button" disabled>Open</button>
<input id="readonly" type="checkbox" checked> Read-only
<br><br>
<div id="status">Init</div>
<div id="output"></div>
<div id="writerText"></div>
<script type="text/javascript" src="lib/orbitdb.min.js" charset="utf-8"></script>
<script type="text/javascript" src="lib/ipfs.js" charset="utf-8"></script>
<script type="text/javascript" src="example.js" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
// Start the example
main()
</script>
</body>
</html>