Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
apparently this has been dead since 2015 https://lingohub.com/blog/20…
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph committed Sep 17, 2020
1 parent e9151ce commit 1df63c5
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions services/t-web/trac-files/common/js/twisted.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,44 +54,7 @@ function removeNodeContent(node) {
}


/**
* Load news feed items, from the Twisted Matrix Labs blog, and insert them
* into the "twisted-news" element, if it exists.
*/
function loadNewsFeeds() {
var container = document.getElementById('twisted-news');
// Bail out if there is no news element.
if (!container) {
return;
}

var feed = new google.feeds.Feed(
'http://feeds.feedburner.com/TwistedMatrixLaboratories');
feed.setNumEntries(5);
feed.load(function(result) {
if (!result.error) {
removeNodeContent(container);
var D = DOMBuilder(container.ownerDocument);
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
var prettyDate = formatDate(new Date(entry.publishedDate));
var entryNode = D('div', {'class': 'feed-entry'}, [
D('a', {'href': entry.link}, [entry.title]),
D('div', {'class': 'feed-updated'}, [
'by ',
D('strong', {}, [entry.author]),
' on ',
D('strong', {}, [prettyDate])])
]);
container.appendChild(entryNode);
}
}
});
}
google.load('feeds', '1');
google.setOnLoadCallback(function () {
$(document).ready(function () {
// Enable Bootstrap.js tabs.
$('#frontpage-tabs a').attr('data-toggle', 'tab');
// Load Twisted Matrix Labs news feed.
loadNewsFeeds();
});

0 comments on commit 1df63c5

Please sign in to comment.