Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More work on the thing.

  • Loading branch information...
commit 8a36b19d06af674860027a22b4ffc56128aa5723 1 parent a9909e5
Mike Cantelon authored
Showing with 8 additions and 5 deletions.
  1. +1 −1  bin/server.js
  2. +7 −4 public/js/twaids.js
2  bin/server.js
View
@@ -27,7 +27,7 @@ fs.readFile(pathToConfig, function(err, data) {
app.get('/latest', function(req, res) {
var validTweets = [];
- twaids.latest(config, 35, lastTweetViewed, function(tweets) {
+ twaids.latest(config, 30, lastTweetViewed, function(tweets) {
var maxIdFound = 0;
for(var index in tweets) {
var tweet = tweets[index];
11 public/js/twaids.js
View
@@ -8,11 +8,12 @@ function latest(destCssId) {
$.ajax({
url: '/latest',
success: function(tweets) {
+ var text = '';
+
tweets.map(function(tweet) {
- var text
- , user = false;
+ var user = false;
- text = '<div>';
+ text += '<div>';
if (tweet.user && tweet.user.screen_name) {
user = ify().at('@' + tweet.user.screen_name);
@@ -22,9 +23,11 @@ function latest(destCssId) {
text += ify().link(ify().at(ify().hash(tweet.text)));
text += '</div>';
+ });
+ if (text != '') {
$('#' + destCssId).prepend(text);
- });
+ }
}
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.