mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 12:43:31 +03:00
38 lines
765 B
Plaintext
38 lines
765 B
Plaintext
!:
|
|
::::::::: Foobug: a simple application.
|
|
::
|
|
|_ [hid=hide vat=[%0 p=@ud]]
|
|
++ poke
|
|
|= [ost=bone *]
|
|
:_ +>(p.vat +(p.vat))
|
|
:~ [ost %give %nice ~]
|
|
==
|
|
::
|
|
++ peek
|
|
|= [you=ship pax=path]
|
|
:- %hymn
|
|
^- manx
|
|
;html
|
|
;head
|
|
;title: Foobug!
|
|
==
|
|
;body
|
|
;p: Dude, a better answer is {<p.vat>}.
|
|
;button(onclick "bump()"): (Bump.)
|
|
;script
|
|
; var mess = 0;
|
|
;
|
|
; function bump() {
|
|
; xhr = new XMLHttpRequest();
|
|
; xhr.onload = function() { mess++; }
|
|
; xhr.open("PUT", "/tim/"+user+"/"+appl+"/"+port+"/"+mess);
|
|
; xhr.setRequestHeader("content-type", "text/json");
|
|
; xhr.send(JSON.stringify({oryx: oryx, xyro: {}}));
|
|
; }
|
|
==
|
|
==
|
|
==
|
|
--
|
|
|
|
|