-
Notifications
You must be signed in to change notification settings - Fork 0
/
notification.html
51 lines (42 loc) · 1.35 KB
/
notification.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="styles/post.css" type="text/css" />
<style>
.item {
height:80px !important;
width:295px;
}
.item img {
margin-bottom:15px;
}
#notification {
width:400px;
}
/* For some reason if I don't embed the CSS directly in this file, Chrome gets all buggy when the notification loads the first time, so... code below. */
</style>
<script src='scripts/jquery-1.6.1.min.js'></script>
<script src="scripts/parse.js"></script>
<script>
function set_notification() {
$('#notification').html('<span class="tag">' + localStorage['notification_tag'] + '</span>\
<a href="' + localStorage['notification_url'] + '">\
<div id="' + localStorage['notification_id'] + '" class="item" onclick="open_item(\'' + localStorage['notification_url'] + '\'); window.close();">\
<img src="' + localStorage['notification_img'] + '" width="107" height="60" />\
<h4>' + localStorage['notification_title'] + '</h4>\
</div>\
</a>');
// console.log('notification done');
}
$('body').ready(function() {
set_notification();
setTimeout(function() {
window.close();
}, 10000);
});
</script>
</head>
<body>
<div id="notification">
</div>
</body>
</html>