comparison about-mozilla.js @ 15:3f9cc6c21849 default tip

Fixed to support the new about:mozilla blog at http://blog.mozilla.com/about_mozilla/.
author Atul Varma <varmaa@toolness.com>
date Fri, 10 Jul 2009 10:44:12 -0700
parents 0921b3bb553d
children
comparison
equal deleted inserted replaced
14:0921b3bb553d 15:3f9cc6c21849
1 var ATOM_URL = "https://developer.mozilla.org/devnews/index.php/feed/atom/"; 1 var ATOM_URL = "http://blog.mozilla.com/about_mozilla/feed/";
2 2
3 var MONTHS = ["January", 3 var MONTHS = ["January",
4 "February", 4 "February",
5 "March", 5 "March",
6 "April", 6 "April",
60 var feed = new google.feeds.Feed(ATOM_URL); 60 var feed = new google.feeds.Feed(ATOM_URL);
61 feed.load( 61 feed.load(
62 function(result) { 62 function(result) {
63 var qs = new Querystring(); 63 var qs = new Querystring();
64 var issue = qs.get("issue", "0"); 64 var issue = qs.get("issue", "0");
65 var feeds = []; 65 var feeds = result.feed.entries;
66 jQuery.each(
67 result.feed.entries,
68 function() {
69 if (jQuery.inArray("about-mozilla", this.categories) != -1)
70 feeds.push(this);
71 });
72 var entry = feeds[issue]; 66 var entry = feeds[issue];
73 $("#raw-issue").html(entry.content); 67 $("#raw-issue").html(entry.content);
74 var pubDate = new Date(entry.publishedDate); 68 var pubDate = new Date(entry.publishedDate);
75 var dateStr = (MONTHS[pubDate.getMonth()] + " " + 69 var dateStr = (MONTHS[pubDate.getMonth()] + " " +
76 pubDate.getDate() + ", " + 70 pubDate.getDate() + ", " +