-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdev.html
More file actions
257 lines (233 loc) · 8.81 KB
/
dev.html
File metadata and controls
257 lines (233 loc) · 8.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>mem.pe: Local storage text paste sharing over websockets</title>
<!-- DEV BEGIN ************************************************ -->
<link rel="stylesheet/less" type="text/css" href="src/css/mempe.less" />
<link rel="stylesheet" type="text/css" href="src/css/prettify.css" />
<link rel="stylesheet" type="text/css" href="src/css/theme.css" />
<script src="src/js/less.min.js" type="text/javascript"></script>
<script src="syntax/prettify.js"></script>
<script src="src/js/zepto.js"></script>
<script src="src/js/zepto.editable.js"></script>
<script src="src/js/zepto.getscript.js"></script>
<script src="src/js/zepto.code.js"></script>
<script src="src/js/underscore.js"></script>
<script src="src/js/backbone.js"></script>
<script src="src/js/app.js"></script>
<script src="src/js/utils.js"></script>
<script src="src/js/storage.js"></script>
<script src="src/js/connection.js"></script>
<script src="src/js/mvc/message.js"></script>
<script src="src/js/mvc/model.js"></script>
<script src="src/js/mvc/edit.js"></script>
<script src="src/js/mvc/code.js"></script>
<script src="src/js/mvc/list.js"></script>
<script src="src/js/mvc/settings.js"></script>
<script type="text/javascript">
less.watch();
app.socketUrl = "ws://localhost:8081";
</script>
<!-- DEV END ************************************************* -->
<script type="text/javascript">
$(function() { app.run(); });
</script>
</head>
<body>
<div id="container">
<div id="header">
<div class="logo"><b>mem.pe</b></div>
<ul class="links">
<li><span><a href="#">paste</a></span></li>
<li><span><a href="#/list">list</a></span></li>
<li><span><a href="#settings">settings</a></span></li>
<li><span><a href="" id="dark">◑</a></span></li>
<li class="right"><span><a class="slogan" href="#about">about</a></span></li>
</ul>
</div>
<div id="panes">
<div id="edit" class="editor">
<textarea class="scroll" wrap="off" autofocus="autofocus"></textarea>
<button>save</button>
</div>
<div id="code">
</div>
<ul id="list">
</ul>
<div id="settings">
</div>
<div id="message">
</div>
</div>
</div>
<script id="codeView" type="text/template">
<div class="toolbar">
<ul class="links">
<li><span class="title"><%- m.title() %></span></li>
<li class="right"><span class="date"><%= m.created() %></span></li>
<% if ( m.isOwn() ) { %>
<li class="right"><span class="separator"></span></li>
<li class="right"><span class="link remove">delete</span></li>
<% } %>
</ul>
</div>
<div class="content">
<div class="codebar">
<% if ( m.syntax() ) { %>
<span class="link raw">view raw</span>
<span class="separator"></span>
<% } %>
<% if ( m.isOwn() ) { %>
<span class="link edit">edit</span>
<% } else { %>
<span class="link fork">fork</span>
<% } %>
<span class="syntax right"><small><%= m.syntax() || "text" %></small></span>
</div>
<pre class="scroll"></pre>
</div>
</script>
<script id="editCodeView" type="text/template">
<div class="editor">
<textarea><%= m.get('text') %></textarea>
<button class="save">save</button> <small class="cancel">cancel</small>
</div>
</script>
<script id="syntaxView" type="text/template">
<select>
<option value="">no syntax</option>
<% for (s in m.app().styles) { %>
<option value="<%= s %>" <%= s === m.get('syntax') ? 'selected="selected"' : '' %>><%= m.app().styles[s][0] %></option>
<% } %>
</select>
</script>
<script id="listView" type="text/template">
<div class="codebar">
<span class="link edit">toggle edit</span>
</div>
<div class="boxen">
</div>
<div class="editor hide">
<textarea></textarea>
<button class="save">save</button> <small class="cancel">reset</small>
<span class="error hide"></span>
</div>
</script>
<script id="pasteListView" type="text/template">
<strong>
<small><%= m.syntax() || "text" %></small>
<span class="navigate"><%- m.title(20) %></span>
<span class="remove">✖</span>
</strong>
<div class="navigate">
<pre class="scroll"></pre>
</div>
</script>
<script id="settingsView" type="text/template">
<div class="error hide">
</div>
<table>
<tr>
<td>username</td>
<td>
<input name="username" value="<%= username %>">
<small>will be part of your URL</small>
</td>
</tr>
<tr>
<td>tab size</td>
<td>
<input name="tabsize" value="<%= tabsize %>">
<small>spaces</small>
</td>
</tr>
<tr>
<td colspan="2">
<button>update</button>
</td>
</tr>
</table>
</script>
<script id="error_REMOTE_NOT_FOUND" type="text/template">
<p><strong>Error - Not Found On Remote</strong><p>
The paste was not found in the remote client's browser. Some of the possible reasons for this to happen are:
<ul>
<li>You are accessing the wrong URL. Please contact the owner of this paste and get the correct one.</li>
<li>The owner of this paste has deleted it from their browser.</li>
<li>There was a technical problem with the other client's browser.</li>
</ul>
</script>
<script id="error_LOCAL_NOT_FOUND" type="text/template">
<p><strong>Error - Not Found Here</strong><p>
The paste was not found in your browser's database.
Some of the possible reasons for this to happen are:
<ul>
<li>You have deleted the paste from your browser.</li>
<li>You saved this paste on your other computer, or in your other browser.</li>
<li>You have cleared your browser's cookies and data.</li>
</ul>
</script>
<script id="error_NOT_CONNECTED" type="text/template">
<p><strong>Error - Host has disconnected</strong><p>
The client who owns this paste has diconnected. They might have closed their browser, or just the tab with mem.pe.
Please contact the person who sent you this link and ask them to log on to http://mem.pe. Once they do, you will
be able to access this page again.
</script>
<script id="error_NO_WEBSOCKET" type="text/template">
<p><strong>Error - Unable to establish websocket connection</strong><p>
Your browser could not connect to websocket.
Some of the possible reasons for this to happen are:
<ul>
<li>You are using an old browser that doesn't support websockets</li>
<li>
You are behind a firewall or VPN that blocks websockets.
See <a href='http://websocketstest.com/'>websocketstest.com</a> to make sure that your network allows websockets.
This site runs its websockets on port 443.
</li>
<li>
There is a server problem. Refresh this page in a few seconds, and if you still see
this error message, please contact the site author at <i>stefan.guen</i>☮gmail.
</li>
</ul>
</script>
<script id="info_NO_PASTES" type="text/template">
You don't have any pastes saved in this browser. <a href="#">Paste</a> something now.
</script>
<script id="page_ABOUT" type="text/template">
<h2>Code pastes saved in local storage and shared via websockets</h2>
<p>
If you <a href="#">paste some text</a>, it is saved in your browser's local storage.
You can send the URL of your paste to anyone, and they will be able to to see it.
Viewers will connect to your browser via a websocket, and will be able to access your paste
for as long as you are connected to this website.
</p>
<p>
In order for people to see your paste, you will have to keep your browser open and logged on to this
web site. If you leave this website, the paste viewers will see a "disconnected" message instead.
</p>
<p>
<h3>Advantages:</h3>
<ul>
<li>
<b>Ownership.</b> There is no server side database, so nothing will be stored on the server.
You are in posession of all code pastes.
</li>
<li>
<b>(<i>Un</i>)availability.</b> Once you leave this site, it will be impossible for anyone to see your
code paste, even if they have its URL.
</li>
<li>
<b>Privacy.</b> Search engines won't be able to index and share your pastes.
</li>
</ul>
</p>
<p>
This site uses HTML5, so if you're using an old browser, you won't be able to see this message.
</p>
<p>
Fork on Github - <a href="https://github.com/naturalist/mempe">https://github.com/naturalist/mempe</a>
</p>
</script>
</body>
</html>