-
Notifications
You must be signed in to change notification settings - Fork 0
/
kd.js
23 lines (22 loc) · 866 Bytes
/
kd.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
google.load("feeds", "1");
function initialize() {
// Setting the RSS feed target for KDnuggets
var feed = new google.feeds.Feed("http://feeds.feedburner.com/kdnuggets-data-mining-analytics");
feed.setNumEntries(10);
var count = 1;
feed.load(function(result) {
if (!result.error) {
var container = document.getElementById("feed");
var html = "";
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
html = "<h5>" + count++ + ". <a href='" + entry.link + "'>" + entry.title + "</a></h5>";
var div = document.createElement("div");
div.innerHTML = html;
container.appendChild(div);
}
document.write(html);
}
});
}
google.setOnLoadCallback(initialize);