mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
/gun
This commit is contained in:
parent
223c1f7029
commit
ab467589c2
@ -37,7 +37,7 @@
|
||||
</script>
|
||||
<script>
|
||||
($.model = $('ul li').clone(true)).removeAttribute('class');
|
||||
var gun = Gun(location.origin);
|
||||
var gun = Gun(location.origin + '/gun');
|
||||
var chat = gun.get('example/chat/data');
|
||||
chat.map().val(function(msg, field){
|
||||
console.log("msg", field, msg);
|
||||
|
@ -26,7 +26,7 @@
|
||||
function clean(text){ return String(text).replace(/\</ig, '<') }
|
||||
</script>
|
||||
<script>
|
||||
var gun = Gun(location.origin);
|
||||
var gun = Gun(location.origin + '/gun');
|
||||
var ref = gun.get('example/json/data');
|
||||
$('#form').onsubmit = function(e){
|
||||
return ref.path( clean($('#field').value) ).put("value"), false; // add a new field, and cancel the form submit.
|
||||
|
@ -11,7 +11,7 @@
|
||||
function clean(text){ return String(text).replace(/\</ig, '<') }
|
||||
</script>
|
||||
<script> // by Forrest Tait! Edited by Mark Nadal.
|
||||
var gun = Gun(location.origin);
|
||||
var gun = Gun(location.origin + '/gun');
|
||||
var todo = gun.get('example/todo/data');
|
||||
$("#add").onsubmit = function(){
|
||||
todo.path(Gun.text.random()).put(clean($("#todo").value)); // add the HTML input's value to a random ID in the todo.
|
||||
|
Loading…
x
Reference in New Issue
Block a user