mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
update basics
This commit is contained in:
parent
f8bb17e27f
commit
1ba73dd47b
@ -1,13 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<textarea style="width: 100%; height: 100%;" placeholder="paste here!"></textarea>
|
||||
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../../../gun/gun.js"></script>
|
||||
|
||||
<script>
|
||||
//var gun = Gun(location.origin + '/gun'), to;
|
||||
var gun = Gun('https://gunjs.herokuapp.com/gun'), to;
|
||||
var gun = Gun(location.origin + '/gun');
|
||||
|
||||
var paste = gun.get('test').get('paste').on(function(data){
|
||||
var to, paste = gun.get('test').get('paste').on(function(data){
|
||||
$('textarea').val(data);
|
||||
})
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html><body>
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
html, body {
|
||||
background: rgb(245, 245, 245);
|
||||
@ -136,5 +136,4 @@ $('#search').on('blur', function(e){
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body></html>
|
||||
</script>
|
@ -1,3 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<video id="video" width="100%"></video>
|
||||
<center>
|
||||
<button id="record">Record</button>
|
||||
@ -8,7 +10,7 @@
|
||||
<script src="../../../gun/gun.js"></script>
|
||||
|
||||
<script>
|
||||
var gun = Gun();
|
||||
var gun = Gun(location.origin + '/gun');
|
||||
var record = {recorder: null, recording: false};
|
||||
|
||||
$('#record').on('click', ()=>{
|
||||
|
@ -1,3 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<h1>Tables</h1>
|
||||
|
||||
<form id="sign">
|
||||
|
@ -1,3 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<h1>User</h1>
|
||||
|
||||
<form id="sign">
|
||||
@ -11,8 +13,8 @@
|
||||
<ul></ul>
|
||||
|
||||
<form id="said">
|
||||
<input id="say">
|
||||
<input id="speak" type="submit" value="speak">
|
||||
<input id="say">
|
||||
<input id="speak" type="submit" value="speak">
|
||||
</form>
|
||||
|
||||
<script src="../jquery.js"></script>
|
||||
@ -27,19 +29,19 @@ $('#up').on('click', function(e){
|
||||
user.create($('#alias').val(), $('#pass').val(), login);
|
||||
});
|
||||
function login(e){
|
||||
user.auth($('#alias').val(), $('#pass').val());
|
||||
user.auth($('#alias').val(), $('#pass').val());
|
||||
return false; // e.preventDefault();
|
||||
};
|
||||
$('#sign').on('submit', login);
|
||||
$('#mask').on('click', login);
|
||||
|
||||
gun.on('auth', function(){
|
||||
$('#sign').hide();
|
||||
user.get('said').map().on(UI);
|
||||
$('#sign').hide();
|
||||
user.get('said').map().on(UI);
|
||||
});
|
||||
|
||||
$('#said').on('submit', function(e){
|
||||
e.preventDefault();
|
||||
e.preventDefault();
|
||||
//if(!user.is){ return }
|
||||
user.get('said').set($('#say').val());
|
||||
$('#say').val("");
|
||||
|
Loading…
x
Reference in New Issue
Block a user