diff --git a/icons/19x19.png b/icons/19x19.png
new file mode 100644
index 0000000..25522e9
Binary files /dev/null and b/icons/19x19.png differ
diff --git a/icons/38x38.png b/icons/38x38.png
new file mode 100644
index 0000000..649e610
Binary files /dev/null and b/icons/38x38.png differ
diff --git a/icons/bg.png b/icons/bg.png
deleted file mode 100644
index a3d71d5..0000000
Binary files a/icons/bg.png and /dev/null differ
diff --git a/icons/icon128.png b/icons/icon128.png
deleted file mode 100644
index e6c9b48..0000000
Binary files a/icons/icon128.png and /dev/null differ
diff --git a/icons/icon16.png b/icons/icon16.png
deleted file mode 100644
index 291a7e9..0000000
Binary files a/icons/icon16.png and /dev/null differ
diff --git a/icons/icon48.png b/icons/icon48.png
deleted file mode 100644
index 596b8fe..0000000
Binary files a/icons/icon48.png and /dev/null differ
diff --git a/manifest.json b/manifest.json
index f7078a6..7d3ec3a 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,18 +1,19 @@
{
- // setting the manifest version
+ // setting the manifest version
"manifest_version": 2,
"name": "dc@gg",
"version": "0.1",
"description": "A simple feed reader from DevCongress' Google Groups forum.",
-// "icons": { "16": "icons/icon16.png",
-// "48": "icons/icon48.png",
-// "128": "icons/icon128.png" },
- // "default_locale": "en",
- //added content_security_policy as a way to allow cross domain downloads of js scripts
- "content_security_policy": "script-src 'self' https://www.google.com; object-src 'self'",
+
+ // added content_security_policy as a way to allow cross domain downloads of js scripts
+
+ "content_security_policy" : "script-src 'self' https://www.google.com; object-src 'self'",
"browser_action": {
- //"default_icon": "icons/icon16.png",
- // "default_title": "dc@gg",
+ "default_icon": {
+ "19" : "icons/19x19.png",
+ "38" : "icons/38x38.png"
+ },
+ // "default_title": "DevCongress Google Groups Reader",
"default_popup": "src/popup.html"
},
// PERMISSIONS
diff --git a/src/.style.css.swp b/src/.style.css.swp
deleted file mode 100644
index 4b02695..0000000
Binary files a/src/.style.css.swp and /dev/null differ
diff --git a/src/popup.html b/src/popup.html
index 0b616af..b0f2b33 100644
--- a/src/popup.html
+++ b/src/popup.html
@@ -1,5 +1,5 @@
-
-
+
+
@@ -11,7 +11,7 @@
-dc@gg
+dev:congress{gg}
diff --git a/src/popup.js b/src/popup.js
index 5f2b594..554825b 100644
--- a/src/popup.js
+++ b/src/popup.js
@@ -1,23 +1,36 @@
- google.load("feeds", "1");
+google.load("feeds", "1");
- function initialize() {
- var feed = new google.feeds.Feed("https://groups.google.com/forum/feed/devcongress/topics/atom.xml?num=15");
- feed.setNumEntries(10);
- var count = 1;
- feed.load(function(result) {
+function initialize() {
+
+ var feed = new google.feeds.Feed("https://groups.google.com/forum/feed/devcongress/topics/atom.xml?num=15");
+ // we only want 10 articles. TODO: implement load more functionality
+ feed.setNumEntries(10);
+ //var count = 1;
+ // check if feed entry is a weekly roundup article
+ function is_roundup(entryTitle) {
+ var re = /^(?=.*\bWeekly\b)(?=.*\News\b).*$/;
+ return entryTitle.match(re);
+ };
+ // load group feed
+ feed.load(function (result) {
if (!result.error) {
- var container = document.getElementById("inner");
- var html = "";
- for (var i = 0; i < result.feed.entries.length; i++) {
- var entry = result.feed.entries[i];
- topic = "Post by: " + entry.author + "
";
- var div = document.createElement("div");
- div.innerHTML = topic;
- container.appendChild(div);
- }
- document.write(html);
+ var container = document.getElementById("inner");
+ var html = "";
+
+ for (var i = 0; i < result.feed.entries.length; i++) {
+ var entry = result.feed.entries[i];
+ topic = "Post by: " + entry.author + "
";
+
+ var div = document.createElement("div");
+ // if feed entry is a weekly roundup article, higlight bg
+ if (null != is_roundup(entry.title)) {
+ div.className = "weekly-roundup";
+ }
+ div.innerHTML = topic;
+ container.appendChild(div);
+ }
}
- });
- }
- google.setOnLoadCallback(initialize);
+ });
+}
+google.setOnLoadCallback(initialize);
\ No newline at end of file
diff --git a/src/style.css b/src/style.css
index 1f9f61c..8ce7605 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1,45 +1,80 @@
body {
- background-color:#C50F4D;
font-size: 13pt;
text-align: center;
- width:300px;
- padding:none;
+ width: 300px;
+ padding: none;
line-height: 100%;
- background:#C50F4D center;
+ background: #FAFAFA center;
}
-a:link, a:active, a:visited {
- color:#F9CF43;
+
+a:link,
+a:active {
+ color: #795548;
text-decoration: none;
-webkit-transition: all 0.3s ease-in-out;
}
+
+a:visited {
+ color: #3F51B5;
+}
+
a:hover {
- color:#fff;
- text-decoration:none;
+ text-decoration: underline;
}
+
.error {
- white-space: nowrap;
- color: red;
+ white-space: nowrap;
+ color: red;
}
-#title{
- font-size:20pt;
- color: #fff;
+
+#title {
+ font-size: 20pt;
+ color: #212121;
padding: 5px;
- text-align:center;
- margin:auto;
+ text-align: center;
+ margin: auto;
}
+
#inner {
- width:100%;
- font-size:14pt;
- overflow:auto;
+ width: 100%;
+ font-size: 14pt;
+ overflow: auto;
text-align: left;
- padding:none;
+ padding: none;
+}
+
+#inner h5 {
+ font-size: 11pt;
+ margin-bottom: 4px;
}
+
+.weekly-roundup {
+ background-color: #FFFDE7;
+}
+
#name {
- color:#ddd;
- font-size:10pt;
- text-align:left;
- overflow:auto;
-}
-::-webkit-scrollbar-track {background-color:#fff;}
-::-webkit-scrollbar-thumb {background-color:#f2f2f2;}
-::-webkit-scrollbar {width:5px;}
+ color: #9E9E9E;
+ font-size: 10pt;
+ text-align: left;
+ overflow: auto;
+}
+
+::-webkit-scrollbar-track {
+ background-color: #fff;
+}
+
+::-webkit-scrollbar-thumb {
+ background-color: #f2f2f2;
+}
+
+::-webkit-scrollbar {
+ width: 5px;
+}
+
+#dev-color {
+ color: #EA148C;
+}
+
+#gg-color {
+ color: #1167E8;
+}
\ No newline at end of file