mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
paste!
This commit is contained in:
parent
1532016224
commit
7abab818ed
@ -1,17 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<style>html, body, textarea { width: 100%; height: 100%; padding: 0; margin: 0; }</style>
|
||||
<textarea placeholder="paste here!"></textarea>
|
||||
|
||||
<textarea id="paste" placeholder="paste here!"></textarea>
|
||||
<script src="../../../gun/gun.js"></script>
|
||||
<script src="../../../gun/lib/dom.js"></script>
|
||||
|
||||
<script>
|
||||
gun = GUN(location.origin + '/gun');
|
||||
|
||||
$('textarea').on('input change blur keyup mouseup touchend', () => {
|
||||
gun.get('test').get('paste').put($('textarea').val())
|
||||
});
|
||||
|
||||
gun.get('test').get('paste').on(data => $('textarea').val(data));
|
||||
gun = GUN(location.origin + '/gun');
|
||||
paste.oninput = () => { gun.get('test').get('paste').put(paste.value) }
|
||||
gun.get('test').get('paste').on(data => paste.value = data);
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user