Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

good line breaks

  • Loading branch information...
commit d7ab7da2a5863013ae9fa75934351c256074ae0e 1 parent 2547a6c
@arminrosu arminrosu authored
Showing with 197 additions and 196 deletions.
  1. +0 −1  .jshintrc
  2. +5 −5 src/services/bitbucket.js
  3. +5 −5 src/services/bitly.js
  4. +4 −4 src/services/blogger.js
  5. +4 −4 src/services/dailymotion.js
  6. +5 −5 src/services/deviantart.js
  7. +3 −3 src/services/facebook_page.js
  8. +2 −2 src/services/flickr.js
  9. +4 −4 src/services/formspring.js
  10. +1 −2  src/services/forrst.js
  11. +3 −3 src/services/foursquare.js
  12. +60 −59 src/services/github.js
  13. +6 −2 src/services/googleplus.js
  14. +5 −5 src/services/googlereader.js
  15. +5 −5 src/services/instapaper.js
  16. +8 −8 src/services/iusethis.js
  17. +8 −8 src/services/lastfm.js
  18. +3 −3 src/services/librarything.js
  19. +2 −3 src/services/mendeley.js
  20. +4 −4 src/services/miso.js
  21. +4 −4 src/services/mlkshk.js
  22. +2 −2 src/services/pinboard.js
  23. +4 −4 src/services/posterous.js
  24. +11 −11 src/services/reddit.js
  25. +2 −2 src/services/rss.js
  26. +2 −2 src/services/slideshare.js
  27. +4 −4 src/services/snipplr.js
  28. +5 −6 src/services/stackoverflow.js
  29. +3 −3 src/services/tumblr.js
  30. +5 −5 src/services/wikipedia.js
  31. +7 −7 src/services/wordpress.js
  32. +8 −8 src/services/youtube.js
  33. +3 −3 src/services/zotero.js
View
1  .jshintrc
@@ -3,7 +3,6 @@
"curly": true,
"eqeqeq": true,
"es3": true,
- "laxbreak": true,
"latedef": true,
"maxlen": 78,
"noarg": true,
View
10 src/services/bitbucket.js
@@ -57,11 +57,11 @@ $.fn.lifestream.feeds.bitbucket = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select events.event,'
- + 'events.node, events.created_on,'
- + 'events.repository.name, events.repository.owner '
- + 'from json where url = "https://api.bitbucket.org/1.0/users/'
- + config.user + '/events/"'),
+ url: $.fn.lifestream.createYqlUrl('select events.event,' +
+ 'events.node, events.created_on,' +
+ 'events.repository.name, events.repository.owner ' +
+ 'from json where url = "https://api.bitbucket.org/1.0/users/' +
+ config.user + '/events/"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseBitbucket(data));
View
10 src/services/bitly.js
@@ -3,15 +3,15 @@ $.fn.lifestream.feeds.bitly = function( config, callback ) {
var template = $.extend({},
{
- created: 'created URL <a href="${short_url}" title="${title}">'
- + '${short_url}</a>'
+ created: 'created URL <a href="${short_url}" title="${title}">' +
+ '${short_url}</a>'
},
config.template);
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select data.short_url, data.created, '
- + 'data.title from json where url="'
- + 'http://bitly.com/u/' + config.user + '.json"'),
+ url: $.fn.lifestream.createYqlUrl('select data.short_url, data.created, '+
+ 'data.title from json where url="' +
+ 'http://bitly.com/u/' + config.user + '.json"'),
dataType: "jsonp",
success: function( input ) {
var output = [], i = 0, j, list;
View
8 src/services/blogger.js
@@ -10,8 +10,8 @@ $.fn.lifestream.feeds.blogger = function( config, callback ) {
parseBlogger = function ( input ) {
var output = [], list, i = 0, j, item, k, l;
- if ( input.query && input.query.count && input.query.count > 0
- && input.query.results.feed.entry ) {
+ if ( input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.feed.entry ) {
list = input.query.results.feed.entry;
j = list.length;
for ( ; i < j; i++) {
@@ -45,8 +45,8 @@ $.fn.lifestream.feeds.blogger = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url="http://'
- + config.user + '.blogspot.com/feeds/posts/default"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url="http://' +
+ config.user + '.blogspot.com/feeds/posts/default"'),
dataType: "jsonp",
success: function ( data ) {
callback(parseBlogger(data));
View
8 src/services/dailymotion.js
@@ -11,8 +11,8 @@ $.fn.lifestream.feeds.dailymotion = function( config, callback ) {
var output = [], list, i = 0, j, item;
- if ( input.query && input.query.count && input.query.count > 0
- && input.query.results.rss.channel.item ) {
+ if ( input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.rss.channel.item ) {
list = input.query.results.rss.channel.item;
j = list.length;
for ( ; i < j; i++) {
@@ -30,8 +30,8 @@ $.fn.lifestream.feeds.dailymotion = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="http://www.dailymotion.com/rss/user/' + config.user + '"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="http://www.dailymotion.com/rss/user/' + config.user + '"'),
dataType: "jsonp",
success: function( data ) {
callback(parseDailymotion(data));
View
10 src/services/deviantart.js
@@ -9,11 +9,11 @@ $.fn.lifestream.feeds.deviantart = function( config, callback ) {
$.ajax({
url: $.fn.lifestream.createYqlUrl(
- 'select title,link,pubDate from rss where '
- + 'url="http://backend.deviantart.com/rss.xml?q=gallery%3A'
- + encodeURIComponent(config.user)
- + '&type=deviation'
- + '" | unique(field="title")'
+ 'select title,link,pubDate from rss where ' +
+ 'url="http://backend.deviantart.com/rss.xml?q=gallery%3A' +
+ encodeURIComponent(config.user) +
+ '&type=deviation' +
+ '" | unique(field="title")'
),
dataType: 'jsonp',
success: function( resp ) {
View
6 src/services/facebook_page.js
@@ -31,9 +31,9 @@ $.fn.lifestream.feeds.facebook_page = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url="'
- + 'www.facebook.com/feeds/page.php?id='
- + config.user + '&format=rss20"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url="' +
+ 'www.facebook.com/feeds/page.php?id=' +
+ config.user + '&format=rss20"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseFBPage(data));
View
4 src/services/flickr.js
@@ -8,8 +8,8 @@ $.fn.lifestream.feeds.flickr = function( config, callback ) {
config.template);
$.ajax({
- url: "http://api.flickr.com/services/feeds/photos_public.gne?id="
- + config.user + "&lang=en-us&format=json",
+ url: "http://api.flickr.com/services/feeds/photos_public.gne?id=" +
+ config.user + "&lang=en-us&format=json",
dataType: "jsonp",
jsonp: 'jsoncallback',
success: function( data ) {
View
8 src/services/formspring.js
@@ -10,8 +10,8 @@ $.fn.lifestream.feeds.formspring = function( config, callback ) {
var parseFormspring = function ( input ) {
var output = [], list, i = 0, j, item;
- if ( input.query && input.query.count && input.query.count > 0
- && input.query.results.rss.channel.item ) {
+ if ( input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.rss.channel.item ) {
list = input.query.results.rss.channel.item;
j = list.length;
for ( ; i < j; i++) {
@@ -29,8 +29,8 @@ $.fn.lifestream.feeds.formspring = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="http://www.formspring.me/profile/' + config.user + '.rss"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="http://www.formspring.me/profile/' + config.user + '.rss"'),
dataType: "jsonp",
success: function ( data ) {
callback(parseFormspring(data));
View
3  src/services/forrst.js
@@ -3,8 +3,7 @@ $.fn.lifestream.feeds.forrst = function( config, callback ) {
var template = $.extend({},
{
- posted: 'posted a ${post_type} '
- + '<a href="${post_url}">${title}</a>'
+ posted: 'posted a ${post_type} <a href="${post_url}">${title}</a>'
},
config.template);
View
6 src/services/foursquare.js
@@ -26,9 +26,9 @@ $.fn.lifestream.feeds.foursquare = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from rss where url='
- + '"https://feeds.foursquare.com/history/'
- + config.user + '.rss"'),
+ url: $.fn.lifestream.createYqlUrl('select * from rss where url=' +
+ '"https://feeds.foursquare.com/history/' +
+ config.user + '.rss"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseFoursquare(data));
View
119 src/services/github.js
@@ -3,51 +3,52 @@ $.fn.lifestream.feeds.github = function( config, callback ) {
var template = $.extend({},
{
- commitCommentEvent: 'commented on <a href="http://github.com/'
- + '${status.repo.name}">${status.repo.name}</a>',
- createBranchEvent: 'created branch <a href="http://github.com/'
- + '${status.repo.name}/tree/${status.payload.ref}">'
- + '${status.payload.ref}</a> at <a href="http://github.com/'
- + '${status.repo.name}">${status.repo.name}</a>',
- createRepositoryEvent: 'created repository <a href="http://github.com/'
- + '${status.repo.name}">${status.repo.name}</a>',
- createTagEvent: 'created tag <a href="http://github.com/'
- + '${status.repo.name}/tree/${status.payload.ref}">'
- + '${status.payload.ref}</a> at <a href="http://github.com/'
- + '${status.repo.name}">${status.repo.name}</a>',
- deleteBranchEvent: 'deleted branch ${status.payload.ref} at '
- + '<a href="http://github.com/${status.repo.name}">'
- + '${status.repo.name}</a>',
- deleteTagEvent: 'deleted tag ${status.payload.ref} at '
- + '<a href="http://github.com/${status.repo.name}">'
- + '${status.repo.name}</a>',
- followEvent: 'started following <a href="http://github.com/'
- + '${status.payload.target.login}">${status.payload.target.login}</a>',
- forkEvent: 'forked <a href="http://github.com/${status.repo.name}">'
- + '${status.repo.name}</a>',
- gistEvent: '${status.payload.action} gist '
- + '<a href="http://gist.github.com/${status.payload.gist.id}">'
- + '${status.payload.gist.id}</a>',
- issueCommentEvent: 'commented on issue <a href="http://github.com/'
- + '${status.repo.name}/issues/${status.payload.issue.number}">'
- + '${status.payload.issue.number}</a> on <a href="http://github.com/'
- + '${status.repo.name}">${status.repo.name}</a>',
- issuesEvent: '${status.payload.action} issue '
- + '<a href="http://github.com/${status.repo.name}/issues/'
- + '${status.payload.issue.number}">${status.payload.issue.number}</a> '
- + 'on <a href="http://github.com/${status.repo.name}">'
- + '${status.repo.name}</a>',
- pullRequestEvent: '${status.payload.action} pull request '
- + '<a href="http://github.com/${status.repo.name}/pull/'
- + '${status.payload.number}">${status.payload.number}</a> on '
- + '<a href="http://github.com/${status.repo.name}">'
- + '${status.repo.name}</a>',
- pushEvent: 'pushed to <a href="http://github.com/${status.repo.name}'
- + '/tree/${status.payload.ref}">${status.payload.ref}</a> at '
- + '<a href="http://github.com/${status.repo.name}">'
- + '${status.repo.name}</a>',
- watchEvent: 'started watching <a href="http://github.com/'
- + '${status.repo.name}">${status.repo.name}</a>'
+ commitCommentEvent: 'commented on <a href="http://github.com/' +
+ '${status.repo.name}">${status.repo.name}</a>',
+ createBranchEvent: 'created branch <a href="http://github.com/' +
+ '${status.repo.name}/tree/${status.payload.ref}">' +
+ '${status.payload.ref}</a> at <a href="http://github.com/' +
+ '${status.repo.name}">${status.repo.name}</a>',
+ createRepositoryEvent: 'created repository ' +
+ '<a href="http://github.com/' +
+ '${status.repo.name}">${status.repo.name}</a>',
+ createTagEvent: 'created tag <a href="http://github.com/' +
+ '${status.repo.name}/tree/${status.payload.ref}">' +
+ '${status.payload.ref}</a> at <a href="http://github.com/' +
+ '${status.repo.name}">${status.repo.name}</a>',
+ deleteBranchEvent: 'deleted branch ${status.payload.ref} at ' +
+ '<a href="http://github.com/${status.repo.name}">' +
+ '${status.repo.name}</a>',
+ deleteTagEvent: 'deleted tag ${status.payload.ref} at ' +
+ '<a href="http://github.com/${status.repo.name}">' +
+ '${status.repo.name}</a>',
+ followEvent: 'started following <a href="http://github.com/' +
+ '${status.payload.target.login}">${status.payload.target.login}</a>',
+ forkEvent: 'forked <a href="http://github.com/${status.repo.name}">' +
+ '${status.repo.name}</a>',
+ gistEvent: '${status.payload.action} gist ' +
+ '<a href="http://gist.github.com/${status.payload.gist.id}">' +
+ '${status.payload.gist.id}</a>',
+ issueCommentEvent: 'commented on issue <a href="http://github.com/' +
+ '${status.repo.name}/issues/${status.payload.issue.number}">' +
+ '${status.payload.issue.number}</a> on <a href="http://github.com/' +
+ '${status.repo.name}">${status.repo.name}</a>',
+ issuesEvent: '${status.payload.action} issue ' +
+ '<a href="http://github.com/${status.repo.name}/issues/' +
+ '${status.payload.issue.number}">${status.payload.issue.number}</a> '+
+ 'on <a href="http://github.com/${status.repo.name}">' +
+ '${status.repo.name}</a>',
+ pullRequestEvent: '${status.payload.action} pull request ' +
+ '<a href="http://github.com/${status.repo.name}/pull/' +
+ '${status.payload.number}">${status.payload.number}</a> on ' +
+ '<a href="http://github.com/${status.repo.name}">' +
+ '${status.repo.name}</a>',
+ pushEvent: 'pushed to <a href="http://github.com/${status.repo.name}' +
+ '/tree/${status.payload.ref}">${status.payload.ref}</a> at ' +
+ '<a href="http://github.com/${status.repo.name}">' +
+ '${status.repo.name}</a>',
+ watchEvent: 'started watching <a href="http://github.com/' +
+ '${status.repo.name}">${status.repo.name}</a>'
},
config.template),
@@ -55,24 +56,24 @@ $.fn.lifestream.feeds.github = function( config, callback ) {
if (status.type === 'CommitCommentEvent' ) {
return $.tmpl( template.commitCommentEvent, {status: status} );
}
- else if (status.type === 'CreateEvent'
- && status.payload.ref_type === 'branch') {
+ else if (status.type === 'CreateEvent' &&
+ status.payload.ref_type === 'branch') {
return $.tmpl( template.createBranchEvent, {status: status} );
}
- else if (status.type === 'CreateEvent'
- && status.payload.ref_type === 'repository') {
+ else if (status.type === 'CreateEvent' &&
+ status.payload.ref_type === 'repository') {
return $.tmpl( template.createRepositoryEvent, {status: status} );
}
- else if (status.type === 'CreateEvent'
- && status.payload.ref_type === 'tag') {
+ else if (status.type === 'CreateEvent' &&
+ status.payload.ref_type === 'tag') {
return $.tmpl( template.createTagEvent, {status: status} );
}
- else if (status.type === 'DeleteEvent'
- && status.payload.ref_type === 'branch') {
+ else if (status.type === 'DeleteEvent' &&
+ status.payload.ref_type === 'branch') {
return $.tmpl( template.deleteBranchEvent, {status: status} );
}
- else if (status.type === 'DeleteEvent'
- && status.payload.ref_type === 'tag') {
+ else if (status.type === 'DeleteEvent' &&
+ status.payload.ref_type === 'tag') {
return $.tmpl( template.deleteTagEvent, {status: status} );
}
else if (status.type === 'FollowEvent' ) {
@@ -128,10 +129,10 @@ $.fn.lifestream.feeds.github = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select '
- + 'json.type, json.actor, json.repo, json.payload, json.created_at '
- + 'from json where url="https://api.github.com/users/' + config.user
- + '/events/public?per_page=100"'),
+ url: $.fn.lifestream.createYqlUrl('select ' +
+ 'json.type, json.actor, json.repo, json.payload, json.created_at ' +
+ 'from json where url="https://api.github.com/users/' + config.user +
+ '/events/public?per_page=100"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseGithub(data));
View
8 src/services/googleplus.js
@@ -3,8 +3,12 @@ $.fn.lifestream.feeds.googleplus = function( config, callback ) {
var template = $.extend({},
{
- posted: '<a href="${actor.url}">${actor.displayName}</a> has posted a new entry <a href="${url}" '
- + 'title="${id}">${title}</a> <!--With--> ${object.replies.totalItems} replies, ${object.plusoners.totalItems} +1s, ${object.resharers.totalItems} Reshares'
+ posted: '<a href="${actor.url}">${actor.displayName}</a>' +
+ ' has posted a new entry <a href="${url}" ' +
+ 'title="${id}">${title}</a> <!--With--> ' +
+ '${object.replies.totalItems} replies, ' +
+ '${object.plusoners.totalItems} +1s, ' +
+ '${object.resharers.totalItems} Reshares'
},
config.template),
View
10 src/services/googlereader.js
@@ -3,8 +3,8 @@ $.fn.lifestream.feeds.googlereader = function( config, callback ) {
var template = $.extend({},
{
- starred: 'shared <a href="{{if link.href}}${link.href}'
- + '{{else}}${source.link.href}{{/if}}">${title.content}</a>'
+ starred: 'shared <a href="{{if link.href}}${link.href}' +
+ '{{else}}${source.link.href}{{/if}}">${title.content}</a>'
},
config.template),
@@ -31,9 +31,9 @@ $.fn.lifestream.feeds.googlereader = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url="'
- + 'www.google.com/reader/public/atom/user%2F'
- + config.user + '%2Fstate%2Fcom.google%2Fbroadcast"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url="' +
+ 'www.google.com/reader/public/atom/user%2F' +
+ config.user + '%2Fstate%2Fcom.google%2Fbroadcast"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseReader(data));
View
10 src/services/instapaper.js
@@ -10,8 +10,8 @@ $.fn.lifestream.feeds.instapaper = function( config, callback ) {
parseInstapaper = function( input ) {
var output = [], list, i = 0, j, item;
- if(input.query && input.query.count && input.query.count > 0
- && input.query.results.rss.channel.item) {
+ if(input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.rss.channel.item) {
list = input.query.results.rss.channel.item;
j = list.length;
@@ -28,9 +28,9 @@ $.fn.lifestream.feeds.instapaper = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url='
- + '"http://www.instapaper.com/starred/rss/'
- + config.user + '"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url=' +
+ '"http://www.instapaper.com/starred/rss/' +
+ config.user + '"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseInstapaper(data));
View
16 src/services/iusethis.js
@@ -11,8 +11,8 @@ $.fn.lifestream.feeds.iusethis = function( config, callback ) {
var output = [], list, i, j, k, l, m = 0, n, item, title, actions,
action, what, os, oss = ["iPhone", "OS X", "Windows"];
- if (input.query && input.query.count && input.query.count > 0
- && input.query.results.rss) {
+ if (input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.rss) {
n = input.query.results.rss.length;
actions = ['started using', 'stopped using', 'stopped loving',
'Downloaded', 'commented on', 'updated entry for',
@@ -58,12 +58,12 @@ $.fn.lifestream.feeds.iusethis = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="http://iphone.iusethis.com/user/feed.rss/' + config.user
- + '" or '
- + 'url="http://osx.iusethis.com/user/feed.rss/' + config.user
- + '" or '
- + 'url="http://win.iusethis.com/user/feed.rss/' + config.user + '"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="http://iphone.iusethis.com/user/feed.rss/' + config.user +
+ '" or ' +
+ 'url="http://osx.iusethis.com/user/feed.rss/' + config.user +
+ '" or ' +
+ 'url="http://win.iusethis.com/user/feed.rss/' + config.user + '"'),
dataType: "jsonp",
success: function( data ) {
callback(parseIusethis(data));
View
16 src/services/lastfm.js
@@ -3,17 +3,17 @@ $.fn.lifestream.feeds.lastfm = function( config, callback ) {
var template = $.extend({},
{
- loved: 'loved <a href="${url}">${name}</a> by '
- + '<a href="${artist.url}">${artist.name}</a>'
+ loved: 'loved <a href="${url}">${name}</a> by ' +
+ '<a href="${artist.url}">${artist.name}</a>'
},
config.template),
parseLastfm = function( input ) {
var output = [], list, i = 0, j;
- if(input.query && input.query.count && input.query.count > 0
- && input.query.results.lovedtracks
- && input.query.results.lovedtracks.track) {
+ if(input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.lovedtracks &&
+ input.query.results.lovedtracks.track) {
list = input.query.results.lovedtracks.track;
j = list.length;
for( ; i<j; i++) {
@@ -30,9 +30,9 @@ $.fn.lifestream.feeds.lastfm = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url='
- + '"http://ws.audioscrobbler.com/2.0/user/'
- + config.user + '/lovedtracks.xml"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url=' +
+ '"http://ws.audioscrobbler.com/2.0/user/' +
+ config.user + '/lovedtracks.xml"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseLastfm(data));
View
6 src/services/librarything.js
@@ -3,9 +3,9 @@ $.fn.lifestream.feeds.librarything = function( config, callback ) {
var template = $.extend({},
{
- book: 'added <a href="http://www.librarything.com/work/book/${book.book_id}"'
- + ' title="${book.title} by ${book.author_fl}">'
- + '${book.title} by ${book.author_fl}</a> to my library'
+ book: 'added <a href="http://www.librarything.com/work/book/${book.book_id}"' +
+ ' title="${book.title} by ${book.author_fl}">' +
+ '${book.title} by ${book.author_fl}</a> to my library'
},
config.template),
View
5 src/services/mendeley.js
@@ -29,9 +29,8 @@ $.fn.lifestream.feeds.mendeley = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url='
- + '"http://www.mendeley.com/groups/'
- + config.user + '/feed/rss/"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url=' +
+ '"http://www.mendeley.com/groups/' + config.user + '/feed/rss/"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseMendeley(data));
View
8 src/services/miso.js
@@ -19,8 +19,8 @@ $.fn.lifestream.feeds.miso = function( config, callback ) {
var item = list[i];
output.push({
- url: 'http://www.gomiso.com/feeds/user/' + config.user
- + '/checkins.rss',
+ url: 'http://www.gomiso.com/feeds/user/' + config.user +
+ '/checkins.rss',
date: new Date( item.pubDate ),
config: config,
html: $.tmpl( template.watched, item )
@@ -31,8 +31,8 @@ $.fn.lifestream.feeds.miso = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url="'
- + 'http://www.gomiso.com/feeds/user/' + config.user + '/checkins.rss"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url="' +
+ 'http://www.gomiso.com/feeds/user/' + config.user + '/checkins.rss"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseMiso(data));
View
8 src/services/mlkshk.js
@@ -12,8 +12,8 @@ $.fn.lifestream.feeds.mlkshk = function( config, callback ) {
var output = [], list, i = 0, j, item;
- if ( input.query && input.query.count && input.query.count > 0
- && input.query.results.rss.channel.item ) {
+ if ( input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.rss.channel.item ) {
list = input.query.results.rss.channel.item;
j = list.length;
for ( ; i < j; i++) {
@@ -29,8 +29,8 @@ $.fn.lifestream.feeds.mlkshk = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="http://mlkshk.com/user/' + config.user + '/rss"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="http://mlkshk.com/user/' + config.user + '/rss"'),
dataType: "jsonp",
success: function ( data ) {
callback(parseMlkshk(data));
View
4 src/services/pinboard.js
@@ -29,8 +29,8 @@ $.fn.lifestream.feeds.pinboard = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="http://feeds.pinboard.in/rss/u:' + config.user + '"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="http://feeds.pinboard.in/rss/u:' + config.user + '"'),
dataType: "jsonp",
success: function( data ) {
callback(parsePinboard(data));
View
8 src/services/posterous.js
@@ -10,8 +10,8 @@ $.fn.lifestream.feeds.posterous = function( config, callback ) {
var parsePosterous = function ( input ) {
var output = [], list, i = 0, j, item;
- if ( input.query && input.query.count && input.query.count > 0
- && input.query.results.rss.channel.item ) {
+ if ( input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.rss.channel.item ) {
list = input.query.results.rss.channel.item;
j = list.length;
for ( ; i < j; i++) {
@@ -29,8 +29,8 @@ $.fn.lifestream.feeds.posterous = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="http://' + config.user + '.posterous.com/rss.xml"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="http://' + config.user + '.posterous.com/rss.xml"'),
dataType: "jsonp",
success: function ( data ) {
callback(parsePosterous(data));
View
22 src/services/reddit.js
@@ -3,15 +3,15 @@ $.fn.lifestream.feeds.reddit = function( config, callback ) {
var template = $.extend({},
{
- commented: '<a href="http://www.reddit.com/r/${item.data.subreddit}'
- + '/comments/${item.data.link_id.substring(3)}/u/'
- + '${item.data.name.substring(3)}?context=3">commented '
- + '(${score})</a> in <a href="http://www.reddit.com/r/'
- + '${item.data.subreddit}">${item.data.subreddit}</a>',
- created: '<a href="http://www.reddit.com${item.data.permalink}">'
- + 'created new thread (${score})</a> in '
- + '<a href="http://www.reddit.com/r/${item.data.subreddit}">'
- + '${item.data.subreddit}</a>'
+ commented: '<a href="http://www.reddit.com/r/${item.data.subreddit}' +
+ '/comments/${item.data.link_id.substring(3)}/u/' +
+ '${item.data.name.substring(3)}?context=3">commented ' +
+ '(${score})</a> in <a href="http://www.reddit.com/r/' +
+ '${item.data.subreddit}">${item.data.subreddit}</a>',
+ created: '<a href="http://www.reddit.com${item.data.permalink}">' +
+ 'created new thread (${score})</a> in ' +
+ '<a href="http://www.reddit.com/r/${item.data.subreddit}">' +
+ '${item.data.subreddit}</a>'
},
config.template);
@@ -51,8 +51,8 @@ $.fn.lifestream.feeds.reddit = function( config, callback ) {
success: function( data ) {
var output = [], i = 0, j;
- if(data && data.data && data.data.children
- && data.data.children.length > 0) {
+ if(data && data.data && data.data.children &&
+ data.data.children.length > 0) {
j = data.data.children.length;
for( ; i<j; i++) {
var item = data.data.children[i];
View
4 src/services/rss.js
@@ -30,8 +30,8 @@ $.fn.lifestream.feeds.rss = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url="'
- + config.user + '"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url="' +
+ config.user + '"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseReader(data));
View
4 src/services/slideshare.js
@@ -29,8 +29,8 @@ $.fn.lifestream.feeds.slideshare = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="http://www.slideshare.net/rss/user/' + config.user + '"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="http://www.slideshare.net/rss/user/' + config.user + '"'),
dataType: "jsonp",
success: function( data ) {
callback(parseSlideshare(data));
View
8 src/services/snipplr.js
@@ -10,8 +10,8 @@ $.fn.lifestream.feeds.snipplr = function( config, callback ) {
var parseSnipplr = function ( input ) {
var output = [], list, i = 0, j, item;
- if ( input.query && input.query.count && input.query.count > 0
- && input.query.results.rss.channel.item ) {
+ if ( input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.rss.channel.item ) {
list = input.query.results.rss.channel.item;
j = list.length;
for ( ; i < j; i++) {
@@ -29,8 +29,8 @@ $.fn.lifestream.feeds.snipplr = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="http://snipplr.com/rss/users/' + config.user + '"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="http://snipplr.com/rss/users/' + config.user + '"'),
dataType: "jsonp",
success: function ( data ) {
callback(parseSnipplr(data));
View
11 src/services/stackoverflow.js
@@ -22,9 +22,9 @@ $.fn.lifestream.feeds.stackoverflow = function( config, callback ) {
title = item.description;
link = question_link + item.post_id;
}
- else if (item.timeline_type === "revision"
- || item.timeline_type === "accepted"
- || item.timeline_type === "askoranswered") {
+ else if (item.timeline_type === "revision" ||
+ item.timeline_type === "accepted" ||
+ item.timeline_type === "askoranswered") {
text = (item.timeline_type === 'askoranswered' ?
item.action : item.action + ' ' + item.post_type);
title = item.detail || item.description || "";
@@ -41,9 +41,8 @@ $.fn.lifestream.feeds.stackoverflow = function( config, callback ) {
};
$.ajax({
- url: "http://api.stackoverflow.com/1.1/users/" + config.user
- + "/timeline?"
- + "jsonp",
+ url: "http://api.stackoverflow.com/1.1/users/" + config.user +
+ "/timeline?jsonp",
dataType: "jsonp",
jsonp: 'jsonp',
success: function( data ) {
View
6 src/services/tumblr.js
@@ -121,9 +121,9 @@ $.fn.lifestream.feeds.tumblr = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select *'
- + ' from tumblr.posts where username="' + config.user + '"'
- + ' and num="' + limit + '"'),
+ url: $.fn.lifestream.createYqlUrl('select *' +
+ ' from tumblr.posts where username="' + config.user + '"' +
+ ' and num="' + limit + '"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseTumblr(data));
View
10 src/services/wikipedia.js
@@ -10,9 +10,9 @@ $.fn.lifestream.feeds.wikipedia = function( config, callback ) {
config.template);
$.ajax({
- url: "http://" + language
- + ".wikipedia.org/w/api.php?action=query&ucuser="
- + config.user + "&list=usercontribs&ucdir=older&format=json",
+ url: "http://" + language +
+ ".wikipedia.org/w/api.php?action=query&ucuser=" +
+ config.user + "&list=usercontribs&ucdir=older&format=json",
dataType: "jsonp",
success: function( data ) {
var output = [], i = 0, j;
@@ -25,8 +25,8 @@ $.fn.lifestream.feeds.wikipedia = function( config, callback ) {
// Fastest way to get the URL.
// Alternatively, we'd have to poll wikipedia for the pageid's link
- item.url = 'http://' + language + '.wikipedia.org/wiki/'
- + item.title.replace(' ', '_');
+ item.url = 'http://' + language + '.wikipedia.org/wiki/' +
+ item.title.replace(' ', '_');
output.push({
date: new Date( item.timestamp ),
View
14 src/services/wordpress.js
@@ -10,8 +10,8 @@ $.fn.lifestream.feeds.wordpress = function( config, callback ) {
var parseWordpress = function ( input ) {
var output = [], list, i = 0, j, item;
- if ( input.query && input.query.count && input.query.count > 0
- && input.query.results.rss.channel.item ) {
+ if ( input.query && input.query.count && input.query.count > 0 &&
+ input.query.results.rss.channel.item ) {
list = input.query.results.rss.channel.item;
j = list.length;
for ( ; i < j; i++) {
@@ -33,12 +33,12 @@ $.fn.lifestream.feeds.wordpress = function( config, callback ) {
if ( config.user ){
// If the config.user property starts with http:// we assume that is the
// full url to the user his blog. We append the /feed to the url.
- url = (config.user.indexOf('http://') === 0
- ? config.user + '/feed'
- : 'http://' + config.user + '.wordpress.com/feed');
+ url = (config.user.indexOf('http://') === 0 ?
+ config.user + '/feed' :
+ 'http://' + config.user + '.wordpress.com/feed');
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where '
- + 'url="' + url + '"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where ' +
+ 'url="' + url + '"'),
dataType: "jsonp",
success: function ( data ) {
callback(parseWordpress(data));
View
16 src/services/youtube.js
@@ -3,10 +3,10 @@ $.fn.lifestream.feeds.youtube = function( config, callback ) {
var template = $.extend({},
{
- uploaded: 'uploaded <a href="${video.player.default}" '
- + 'title="${video.description}">${video.title}</a>',
- favorited: 'favorited <a href="${video.player.default}" '
- + 'title="${video.description}">${video.title}</a>'
+ uploaded: 'uploaded <a href="${video.player.default}" ' +
+ 'title="${video.description}">${video.title}</a>',
+ favorited: 'favorited <a href="${video.player.default}" ' +
+ 'title="${video.description}">${video.title}</a>'
},
config.template),
@@ -48,8 +48,8 @@ $.fn.lifestream.feeds.youtube = function( config, callback ) {
};
$.ajax({
- url: "http://gdata.youtube.com/feeds/api/users/" + config.user
- + "/favorites?v=2&alt=jsonc",
+ url: "http://gdata.youtube.com/feeds/api/users/" + config.user +
+ "/favorites?v=2&alt=jsonc",
dataType: 'jsonp',
success: function( data ) {
callback(parseYoutube(data, 'favorited'));
@@ -57,8 +57,8 @@ $.fn.lifestream.feeds.youtube = function( config, callback ) {
});
$.ajax({
- url: "http://gdata.youtube.com/feeds/api/users/" + config.user
- + "/uploads?v=2&alt=jsonc",
+ url: "http://gdata.youtube.com/feeds/api/users/" + config.user +
+ "/uploads?v=2&alt=jsonc",
dataType: 'jsonp',
success: function( data ) {
callback(parseYoutube(data, 'uploaded'));
View
6 src/services/zotero.js
@@ -27,9 +27,9 @@ $.fn.lifestream.feeds.zotero = function( config, callback ) {
};
$.ajax({
- url: $.fn.lifestream.createYqlUrl('select * from xml where url='
- + '"https://api.zotero.org/users/'
- + config.user + '/items"'),
+ url: $.fn.lifestream.createYqlUrl('select * from xml where url=' +
+ '"https://api.zotero.org/users/' +
+ config.user + '/items"'),
dataType: 'jsonp',
success: function( data ) {
callback(parseZotero(data));

0 comments on commit d7ab7da

Please sign in to comment.
Something went wrong with that request. Please try again.