-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreader.html
More file actions
42 lines (42 loc) · 1.08 KB
/
reader.html
File metadata and controls
42 lines (42 loc) · 1.08 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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>delicius reader</title>
</head>
<body>
<h1>Deliciuos Reader</h1>
<ul id="items">
<li>loading ...</li>
</ul>
<script type="text/javascript">
function displayFeed(data) {
var ul = document.getElementById("items");
ul.innerHTML = "";
data.forEach(function(i) {
// opera.postError(i.u + ": " + i.d);
var li = document.createElement("li");
var a = document.createElement("a");
a.href = i.u;
a.target = "_blank";
a.innerHTML = i.d;
li.appendChild(a);
ul.appendChild(li);
});
}
window.addEventListener('scroll', function(e) {
e.stopPropagation();
}, false);
window.addEventListener('load', function() {
var username = "USERNAME";
// if(username = localStorage["username"]) {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://feeds.delicious.com/v2/json/" + username + "?callback=displayFeed";
document.body.appendChild(script);
// } else {
// }
}, false);
</script>
</body>
</html>