2015-10-09 01:22:34 +03:00
|
|
|
/= all /; flop /^ (list (pair time ,*)) /: /%%/ /& /mime/
|
|
|
|
;div
|
2015-10-21 02:44:39 +03:00
|
|
|
;link(rel "stylesheet", href "/home/lib/base.css");
|
|
|
|
;link(rel "stylesheet", href "/home/pub/paste/main.css");
|
2015-10-09 01:22:34 +03:00
|
|
|
;script@"//code.jquery.com/jquery-2.1.4.min.js";
|
2015-10-27 22:18:51 +03:00
|
|
|
;script@"/~/as/own/~/at/home/lib/urb.js";
|
2015-10-09 01:22:34 +03:00
|
|
|
;script:'''
|
2015-10-21 02:44:39 +03:00
|
|
|
document.title = 'pastebin - urbit'
|
2015-10-09 01:22:34 +03:00
|
|
|
urb.appl = 'write'
|
|
|
|
urb.send.mark = 'write-paste'
|
|
|
|
submit = function(){
|
2015-10-21 02:44:39 +03:00
|
|
|
if($("select :selected").attr('value')===undefined) {
|
|
|
|
$("select").addClass('err')
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
$("select").removeClass('err')
|
|
|
|
$("textarea,button").attr('disabled', true)
|
2015-10-09 01:22:34 +03:00
|
|
|
urb.send({
|
|
|
|
txt:$("textarea").val(),
|
|
|
|
typ:$("select :selected").val()
|
|
|
|
}, function(){
|
|
|
|
$.getJSON('paste/new.json',null,function(resp){
|
|
|
|
if(!resp) throw "No paste"
|
|
|
|
window.location = "paste/"+resp.u
|
|
|
|
})})
|
|
|
|
}
|
|
|
|
'''
|
|
|
|
::
|
2015-10-21 02:44:39 +03:00
|
|
|
;h1: New
|
2015-10-09 01:22:34 +03:00
|
|
|
;p:textarea;
|
|
|
|
;select
|
2015-10-21 02:44:39 +03:00
|
|
|
;option(): Type
|
2015-10-09 01:22:34 +03:00
|
|
|
;option(value "md"): Markdown
|
|
|
|
;option(value "txt"): Text
|
|
|
|
;option(value "hoon"): Hoon
|
|
|
|
==
|
2015-10-21 02:44:39 +03:00
|
|
|
;button(onclick "submit()"):"Submit"
|
2015-10-09 01:22:34 +03:00
|
|
|
;hr;
|
2015-10-21 02:44:39 +03:00
|
|
|
;h1: Recent
|
2015-10-09 01:22:34 +03:00
|
|
|
;* (turn all |=([a=time *] ;p:a/"paste/{<a>}":"{<a>}"))
|
|
|
|
==
|