43 |
max-height: 120px; /* 160px - 20px * 2 */ |
max-height: 120px; /* 160px - 20px * 2 */ |
44 |
overflow: auto; |
overflow: auto; |
45 |
background-color: #C0C0C0; |
background-color: #C0C0C0; |
46 |
|
font-size: smaller; |
47 |
} |
} |
48 |
#panel p { |
#panel p { |
49 |
margin: 0; |
margin: 0; |
78 |
<a href="javascript:setProp ('strokeStyle', 'white'); togglePanel ()" style="color: white">white</a>] |
<a href="javascript:setProp ('strokeStyle', 'white'); togglePanel ()" style="color: white">white</a>] |
79 |
</p> |
</p> |
80 |
|
|
81 |
|
<hr> |
82 |
|
|
83 |
|
<p> |
84 |
|
<a href="javascript:savePNG (); togglePanel ()" class=editor-only>PNGize</a> |
85 |
|
<a href="javascript:haiku (); togglePanel ()" class=editor-only>Haiku</a> |
86 |
|
</p> |
87 |
|
|
88 |
|
<p> |
89 |
|
<a href="client.html?mode=editor" id=clone-link>Clone</a> |
90 |
|
<a href="client.html?mode=editor">New</a></menu> |
91 |
|
</p> |
92 |
|
|
93 |
|
<p> |
94 |
|
<a href="server.cgi?mode=list" rel=index>List</a> |
95 |
|
</p> |
96 |
|
|
97 |
</section> |
</section> |
98 |
|
|
99 |
<menu><a href="javascript:togglePanel ()" class=editor-only>Panel</a> |
<menu><a href="javascript:togglePanel ()" class=editor-only>Panel</a> |
|
<a href="javascript:savePNG ()" class=editor-only>PNGize</a> |
|
100 |
<a href="client.html?mode=editor" id=edit-link rel=edit class=viewer-only>Edit</a> |
<a href="client.html?mode=editor" id=edit-link rel=edit class=viewer-only>Edit</a> |
101 |
<a href="client.html?mode=viewer" id=view-link class=editor-only>View</a> |
<a href="client.html?mode=viewer" id=view-link class=editor-only>View</a> |
|
<a href="server.cgi?mode=list" rel=index>List</a> |
|
102 |
<a href="server.cgi?mode=prev" id=prev-link rel=prev>Prev</a> |
<a href="server.cgi?mode=prev" id=prev-link rel=prev>Prev</a> |
103 |
<a href="server.cgi?mode=next" id=next-link rel=next>Next</a> |
<a href="server.cgi?mode=next" id=next-link rel=next>Next</a></menu> |
|
<a href="client.html?mode=editor" id=clone-link>Clone</a> |
|
|
<a href="client.html?mode=editor">New</a></menu> |
|
104 |
|
|
105 |
<script> |
<script> |
106 |
function $ (id) { return document.getElementById (id) } |
function $ (id) { return document.getElementById (id) } |
247 |
// location.href = xhr.getResponseHeader ('Location'); |
// location.href = xhr.getResponseHeader ('Location'); |
248 |
// } |
// } |
249 |
} |
} |
250 |
|
|
251 |
|
function haiku () { |
252 |
|
var purl = url.replace (/server\.cgi/, 'proxy.php'); |
253 |
|
var data = canvas.toDataURL ('image/png'); |
254 |
|
var xhr = new XMLHttpRequest (); |
255 |
|
xhr.open ('POST', purl + ';mode=haiku', true); |
256 |
|
xhr.setRequestHeader ('Content-Type', 'text/plain'); |
257 |
|
xhr.setRequestHeader ('X-Data-URL', data); |
258 |
|
xhr.send (null); |
259 |
|
} |
260 |
</script> |
</script> |