Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added icons/19x19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/38x38.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed icons/bg.png
Binary file not shown.
Binary file removed icons/icon128.png
Binary file not shown.
Binary file removed icons/icon16.png
Binary file not shown.
Binary file removed icons/icon48.png
Binary file not shown.
19 changes: 10 additions & 9 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file removed src/.style.css.swp
Binary file not shown.
6 changes: 3 additions & 3 deletions src/popup.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
Expand All @@ -11,7 +11,7 @@

<body>
<!--TITLE-->
<div id="title">dc@gg</div>
<div id="title"><span id="dev-color">dev</span>:congress{<span id="gg-color">gg</span>}</div>
<!--end TITLE-->
<div id="inner"></div>
</body>
Expand Down
51 changes: 32 additions & 19 deletions src/popup.js
Original file line number Diff line number Diff line change
@@ -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 = "<h5>" + count++ + ". <a href='" + entry.link + "'>" + entry.title + "</a></h5><div id=\"name\">Post by: " + entry.author + "</div>";
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 = "<h5>" + "<a href='" + entry.link + "'>" + entry.title + "</a></h5><div id=\"name\">Post by: " + entry.author + "</div>";

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);
89 changes: 62 additions & 27 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -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;
}