Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use favicons and bug fixes.

  • Loading branch information...
commit e1013b21145e2d7a1951649f4ed0a6aab1c6b913 1 parent d4d5919
@protz authored
View
1  content/index.html
@@ -5,6 +5,7 @@
<title>RSS Dashboard</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
<link rel="shortcut icon" href="chrome://rsstab/skin/icon.png">
+ <link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<script src="js/jquery-1.5.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.text-overflow.js" type="text/javascript" charset="utf-8"></script>
<script src="js/rssTab.js" type="application/javascript;version=1.8" charset="utf-8"></script>
View
15 content/js/rssTab.js
@@ -54,6 +54,13 @@ let Log = setupLogging("RssTab.UI");
let folderToFeed = {};
let gAnimating = false;
+let feedDownloader = Cc["@mozilla.org/newsblog-feed-downloader;1"]
+ .getService(Ci.nsINewsBlogFeedDownloader);
+
+function folderToFeedUrls(aFolder) {
+ return aFolder.msgDatabase.dBFolderInfo.getCharProperty("feedUrl");
+}
+
function Feed (aFolder) {
// Remember the folder we're representing.
this.folder = aFolder;
@@ -68,12 +75,17 @@ function Feed (aFolder) {
Feed.prototype = {
create: function _Feed_create() {
+ let feedUrls = folderToFeedUrls(this.folder).split("|");
+ let feedUrl = feedUrls[0] || feedUrls[1];
let div = document.createElement("div");
div.classList.add("listContainer");
div.classList.add("c2");
div.classList.add("border");
let h2 = document.createElement("h2");
- h2.textContent = this.folder.prettiestName;
+ let favicon = document.createElement("img");
+ favicon.setAttribute("src", "http://getfavicon.appspot.com/" + encodeURI(feedUrl));
+ h2.appendChild(favicon);
+ h2.appendChild(document.createTextNode(this.folder.prettiestName));
h2.classList.add("feedTitle");
let span = document.createElement("span");
let img = document.createElement("img");
@@ -140,6 +152,7 @@ Feed.prototype = {
background: event.button, // 1 is middle-click, 0 is left click
});
li.classList.remove("unread");
+ this.updateUnreadCount();
}.bind(this), false);
if (!aMsgHdr.isRead)
li.classList.add("unread");
View
22 content/style.css
@@ -93,12 +93,18 @@ a:hover, label:hover {
#header {
width: 100%;
- padding: 10px 0;
+ padding: 10px 0 0 0!important;
background-color: #fff;
}
#header h1 {
- font-size: 12px;
+ font-size: 40px;
+ font-family: 'Pacifico', arial, serif;
+ color: #B85520;
+}
+
+#header > div {
+ margin-bottom: 0;
}
.status {
@@ -119,16 +125,24 @@ h2 {
-webkit-border-radius: 5px 5px 0 0;
}
+h2 > img /* favicon */ {
+ vertical-align: text-top;
+ margin-right: 8px;
+ height: 16px;
+ width: 16px;
+}
+
.feedTitle span {
float: right;
}
-.feedTitle img {
+.feedTitle span img {
cursor: pointer;
display: none;
+ vertical-align: middle;
}
-.hasUnread .feedTitle img {
+.hasUnread .feedTitle span img {
display: inline;
}
View
BIN  skin/unread.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.