forked from reddit-archive/reddit-companion
/
mail.html
31 lines (31 loc) · 1013 Bytes
/
mail.html
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
<html>
<head>
<style>
body { margin: 5px; font-family: verdana; cursor: pointer; }
td { font-size: 8pt; }
.userlink { text-decoration: none; cursor: pointer; color: blue; }
</style>
</head>
<body id="template">
<table cellspacing="0" cellpadding="0" style="width:100%">
<tr>
<td valign="top"><img width="15px" src="images/reddit-mail.svg" /></td>
<td valign="top">
Mail from <span id="from"></span><br />
<b><span id="subject"></span></b><br/>
<br/>
<span id="body"></span>
</td>
</tr>
</table>
</body>
<script src="jquery.js"></script>
<script>
var data = JSON.parse(window.location.hash.substr(1));
for(var k in data) {
var s = "" + data[k];
s = s.replace(/</g, '<').replace(/>/g, '>').replace(/\n/g, '<br />');
$('#' + k).append(s);
}
</script>
</html>