├── .gitignore ├── favicon.ico ├── design ├── logo_v1.ai ├── logo_v1.png ├── logo_v1_16.png ├── logo_v1_32.png ├── logo_v1_64.png ├── logo_v1_128.png ├── logo_v1_256.png └── logo_v1_512.png ├── .gitattributes ├── src ├── favicons │ ├── atom.png │ ├── miso.png │ ├── rss.png │ ├── bitly.png │ ├── disqus.png │ ├── fancy.png │ ├── flickr.png │ ├── forrst.png │ ├── github.png │ ├── hypem.png │ ├── lastfm.png │ ├── mlkshk.png │ ├── pocket.png │ ├── quora.png │ ├── reddit.png │ ├── tumblr.png │ ├── vimeo.png │ ├── zotero.png │ ├── bitbucket.png │ ├── blogger.png │ ├── citeulike.png │ ├── delicious.png │ ├── dribbble.png │ ├── foomark.png │ ├── gimmebar.png │ ├── iusethis.png │ ├── linkedin.png │ ├── mendeley.png │ ├── pinboard.png │ ├── posterous.png │ ├── snipplr.png │ ├── twitter.png │ ├── wikipedia.png │ ├── wordpress.png │ ├── youtube.png │ ├── dailymotion.png │ ├── deviantart.png │ ├── formspring.png │ ├── foursquare.png │ ├── googleplus.png │ ├── instapaper.png │ ├── slideshare.png │ ├── facebook_page.png │ ├── librarything.png │ └── stackoverflow.png ├── services │ ├── delicious.js │ ├── forrst.js │ ├── dribbble.js │ ├── gimmebar.js │ ├── foomark.js │ ├── youtube.js │ ├── flickr.js │ ├── citeulike.js │ ├── snipplr.js │ ├── facebook_page.js │ ├── foursquare.js │ ├── bitly.js │ ├── pinboard.js │ ├── slideshare.js │ ├── mlkshk.js │ ├── atom.js │ ├── pocket.js │ ├── deviantart.js │ ├── instapaper.js │ ├── posterous.js │ ├── zotero.js │ ├── fancy.js │ ├── dailymotion.js │ ├── formspring.js │ ├── miso.js │ ├── librarything.js │ ├── mendeley.js │ ├── lastfm.js │ ├── wikipedia.js │ ├── hypem.js │ ├── wordpress.js │ ├── disqus.js │ ├── googleplus.js │ ├── rss.js │ ├── stackoverflow.js │ ├── blogger.js │ ├── quora.js │ ├── linkedin.js │ ├── iusethis.js │ ├── reddit.js │ ├── vimeo.js │ ├── bitbucket.js │ ├── twitter.js │ ├── tumblr.js │ └── github.js └── core.js ├── download ├── img │ ├── download.png │ └── bg-content.png ├── js │ ├── downloadify.swf │ ├── jquery.notifications.min.js │ ├── downloadify.min.js │ ├── jquery.notifications.js │ ├── script.min.js │ ├── jquery.mockjax.min.js │ ├── script.js │ └── swfobject.min.js ├── services.json ├── index.html └── css │ └── style.css ├── me ├── assets │ ├── aftasansthin-regular-webfont.eot │ ├── aftasansthin-regular-webfont.ttf │ └── aftasansthin-regular-webfont.woff ├── jquery.ba-bbq.min.js └── index.html ├── .editorconfig ├── .jshintrc ├── lifestream.jquery.json ├── LICENSE ├── COMMITTERS ├── index.html ├── template.html ├── example.html └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/favicon.ico -------------------------------------------------------------------------------- /design/logo_v1.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/design/logo_v1.ai -------------------------------------------------------------------------------- /design/logo_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/design/logo_v1.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Default 2 | * text=auto 3 | 4 | # LF Please 5 | *.js text 6 | *.json text 7 | *.html text 8 | -------------------------------------------------------------------------------- /design/logo_v1_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/design/logo_v1_16.png -------------------------------------------------------------------------------- /design/logo_v1_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/design/logo_v1_32.png -------------------------------------------------------------------------------- /design/logo_v1_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/design/logo_v1_64.png -------------------------------------------------------------------------------- /src/favicons/atom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/atom.png -------------------------------------------------------------------------------- /src/favicons/miso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/miso.png -------------------------------------------------------------------------------- /src/favicons/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/rss.png -------------------------------------------------------------------------------- /design/logo_v1_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/design/logo_v1_128.png -------------------------------------------------------------------------------- /design/logo_v1_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/design/logo_v1_256.png -------------------------------------------------------------------------------- /design/logo_v1_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/design/logo_v1_512.png -------------------------------------------------------------------------------- /src/favicons/bitly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/bitly.png -------------------------------------------------------------------------------- /src/favicons/disqus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/disqus.png -------------------------------------------------------------------------------- /src/favicons/fancy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/fancy.png -------------------------------------------------------------------------------- /src/favicons/flickr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/flickr.png -------------------------------------------------------------------------------- /src/favicons/forrst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/forrst.png -------------------------------------------------------------------------------- /src/favicons/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/github.png -------------------------------------------------------------------------------- /src/favicons/hypem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/hypem.png -------------------------------------------------------------------------------- /src/favicons/lastfm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/lastfm.png -------------------------------------------------------------------------------- /src/favicons/mlkshk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/mlkshk.png -------------------------------------------------------------------------------- /src/favicons/pocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/pocket.png -------------------------------------------------------------------------------- /src/favicons/quora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/quora.png -------------------------------------------------------------------------------- /src/favicons/reddit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/reddit.png -------------------------------------------------------------------------------- /src/favicons/tumblr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/tumblr.png -------------------------------------------------------------------------------- /src/favicons/vimeo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/vimeo.png -------------------------------------------------------------------------------- /src/favicons/zotero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/zotero.png -------------------------------------------------------------------------------- /download/img/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/download/img/download.png -------------------------------------------------------------------------------- /src/favicons/bitbucket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/bitbucket.png -------------------------------------------------------------------------------- /src/favicons/blogger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/blogger.png -------------------------------------------------------------------------------- /src/favicons/citeulike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/citeulike.png -------------------------------------------------------------------------------- /src/favicons/delicious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/delicious.png -------------------------------------------------------------------------------- /src/favicons/dribbble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/dribbble.png -------------------------------------------------------------------------------- /src/favicons/foomark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/foomark.png -------------------------------------------------------------------------------- /src/favicons/gimmebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/gimmebar.png -------------------------------------------------------------------------------- /src/favicons/iusethis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/iusethis.png -------------------------------------------------------------------------------- /src/favicons/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/linkedin.png -------------------------------------------------------------------------------- /src/favicons/mendeley.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/mendeley.png -------------------------------------------------------------------------------- /src/favicons/pinboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/pinboard.png -------------------------------------------------------------------------------- /src/favicons/posterous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/posterous.png -------------------------------------------------------------------------------- /src/favicons/snipplr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/snipplr.png -------------------------------------------------------------------------------- /src/favicons/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/twitter.png -------------------------------------------------------------------------------- /src/favicons/wikipedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/wikipedia.png -------------------------------------------------------------------------------- /src/favicons/wordpress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/wordpress.png -------------------------------------------------------------------------------- /src/favicons/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/youtube.png -------------------------------------------------------------------------------- /download/img/bg-content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/download/img/bg-content.png -------------------------------------------------------------------------------- /download/js/downloadify.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/download/js/downloadify.swf -------------------------------------------------------------------------------- /src/favicons/dailymotion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/dailymotion.png -------------------------------------------------------------------------------- /src/favicons/deviantart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/deviantart.png -------------------------------------------------------------------------------- /src/favicons/formspring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/formspring.png -------------------------------------------------------------------------------- /src/favicons/foursquare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/foursquare.png -------------------------------------------------------------------------------- /src/favicons/googleplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/googleplus.png -------------------------------------------------------------------------------- /src/favicons/instapaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/instapaper.png -------------------------------------------------------------------------------- /src/favicons/slideshare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/slideshare.png -------------------------------------------------------------------------------- /src/favicons/facebook_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/facebook_page.png -------------------------------------------------------------------------------- /src/favicons/librarything.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/librarything.png -------------------------------------------------------------------------------- /src/favicons/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/src/favicons/stackoverflow.png -------------------------------------------------------------------------------- /me/assets/aftasansthin-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/me/assets/aftasansthin-regular-webfont.eot -------------------------------------------------------------------------------- /me/assets/aftasansthin-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/me/assets/aftasansthin-regular-webfont.ttf -------------------------------------------------------------------------------- /me/assets/aftasansthin-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christianvuerings/jquery-lifestream/HEAD/me/assets/aftasansthin-regular-webfont.woff -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | ; editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "bitwise": true, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "es3": true, 6 | "latedef": true, 7 | "maxlen": 78, 8 | "noarg": true, 9 | "noempty": true, 10 | "nonew": true, 11 | "trailing": true, 12 | "undef": true, 13 | "unused": true, 14 | // environment 15 | "browser": true, 16 | "jquery": true 17 | } -------------------------------------------------------------------------------- /download/services.json: -------------------------------------------------------------------------------- 1 | ["atom","bitbucket","bitly","blogger","citeulike","dailymotion","delicious","deviantart","disqus","dribbble","facebook_page","fancy","flickr","foomark","formspring","forrst","foursquare","gimmebar","github","googleplus","hypem","instapaper","iusethis","lastfm","librarything","linkedin","mendeley","miso","mlkshk","pinboard","pocket","posterous","quora","reddit","rss","slideshare","snipplr","stackoverflow","tumblr","twitter","vimeo","wikipedia","wordpress","youtube","zotero"] -------------------------------------------------------------------------------- /download/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Custom Download Builder 6 | 7 | 8 | 9 |
10 |
11 | Custom Download Builder 12 |
13 | 14 |
15 |
16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/services/delicious.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.delicious = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | bookmarked: 'bookmarked ${d}' 7 | }, 8 | config.template); 9 | 10 | $.ajax({ 11 | url: "https://api.del.icio.us/v2/json/" + config.user, 12 | dataType: "jsonp", 13 | success: function( data ) { 14 | var output = [], i = 0, j; 15 | if (data && data.length && data.length > 0) { 16 | j = data.length; 17 | for( ; i < j; i++) { 18 | var item = data[i]; 19 | output.push({ 20 | date: new Date(item.dt), 21 | config: config, 22 | html: $.tmpl( template.bookmarked, item ) 23 | }); 24 | } 25 | } 26 | callback(output); 27 | } 28 | }); 29 | 30 | // Expose the template. 31 | // We use this to check which templates are available 32 | return { 33 | "template" : template 34 | }; 35 | 36 | }; 37 | })(jQuery); 38 | -------------------------------------------------------------------------------- /lifestream.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lifestream", 3 | "version": "0.5.5", 4 | "title": "jQuery Lifestream", 5 | "description": "Show a stream of your online activity with jQuery", 6 | "keywords": [ 7 | "jquery", 8 | "plugin", 9 | "lifestream", 10 | "twitter", 11 | "stream", 12 | "mashup", 13 | "social", 14 | "google" 15 | ], 16 | "homepage": "https://github.com/christianvuerings/jquery-lifestream", 17 | "author": { 18 | "name": "Christian Vuerings", 19 | "url": "http://denbuzze.com" 20 | }, 21 | "licenses" : [ 22 | { 23 | "type" : "MIT", 24 | "url" : "https://raw.github.com/christianvuerings/jquery-lifestream/master/LICENSE" 25 | } 26 | ], 27 | "bugs": "https://github.com/christianvuerings/jquery-lifestream/issues", 28 | "dependencies": { 29 | "jquery": ">=1.4.2" 30 | }, 31 | "docs": "https://github.com/christianvuerings/jquery-lifestream/blob/master/README.md", 32 | "demo": "http://christianvuerings.github.com/jquery-lifestream/me/" 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Christian Vuerings 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /src/services/forrst.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.forrst = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | posted: 'posted a ${post_type} ${title}' 7 | }, 8 | config.template); 9 | 10 | $.ajax({ 11 | url: "https://forrst.com/api/v2/users/posts?username=" + config.user, 12 | dataType: "jsonp", 13 | success: function( data ) { 14 | var output = [], i=0, j; 15 | if( data && data.resp.length && data.resp.length > 0 ) { 16 | j = data.resp.length; 17 | for( ; i < j; i++ ) { 18 | var item = data.resp[i]; 19 | output.push({ 20 | date: new Date( item.created_at.replace(' ', 'T') ), 21 | config: config, 22 | html: $.tmpl( template.posted, item ) 23 | }); 24 | } 25 | } 26 | callback( output ); 27 | } 28 | }); 29 | 30 | // Expose the template. 31 | // We use this to check which templates are available 32 | return { 33 | "template" : template 34 | }; 35 | 36 | }; 37 | })(jQuery); 38 | -------------------------------------------------------------------------------- /src/services/dribbble.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.dribbble = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | posted: 'posted a shot ${title}' 7 | }, 8 | config.template); 9 | 10 | $.ajax({ 11 | url: "https://api.dribbble.com/players/" + config.user + "/shots", 12 | dataType: "jsonp", 13 | success: function( data ) { 14 | var output = [], i = 0, j; 15 | 16 | if(data && data.total) { 17 | j = data.shots.length; 18 | for( ; i${title}' 7 | }, 8 | config.template); 9 | 10 | $.ajax({ 11 | url: "https://gimmebar.com/api/v0/public/assets/" + config.user + ".json?jsonp_callback=?", 12 | dataType: "json", 13 | success: function( data ) { 14 | data = data.records; 15 | var output = [], i = 0, j; 16 | if (data && data.length && data.length > 0) { 17 | j = data.length; 18 | for( ; i < j; i++) { 19 | var item = data[i]; 20 | output.push({ 21 | date: new Date(item.date * 1000), 22 | config: config, 23 | html: $.tmpl( template.bookmarked, item ) 24 | }); 25 | } 26 | } 27 | callback(output); 28 | } 29 | }); 30 | 31 | // Expose the template. 32 | // We use this to check which templates are available 33 | return { 34 | "template" : template 35 | }; 36 | 37 | }; 38 | })(jQuery); 39 | -------------------------------------------------------------------------------- /src/services/foomark.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.foomark = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | bookmarked: 'bookmarked ${url}' 7 | }, 8 | config.template); 9 | 10 | $.ajax({ 11 | url: "http://api.foomark.com/urls/list/", 12 | data: { 13 | format: "jsonp", 14 | username: config.user 15 | }, 16 | dataType: "jsonp", 17 | success: function( data ) { 18 | 19 | var output = [], i=0, j; 20 | if( data && data.length && data.length > 0 ) { 21 | j = data.length; 22 | for( ; i < j; i++ ) { 23 | var item = data[i]; 24 | output.push({ 25 | date: new Date( item.created_at.replace(/-/g, '/') ), 26 | config: config, 27 | html: $.tmpl( template.bookmarked, item ) 28 | }); 29 | } 30 | } 31 | callback( output ); 32 | } 33 | }); 34 | 35 | // Expose the template. 36 | // We use this to check which templates are available 37 | return { 38 | "template" : template 39 | }; 40 | 41 | }; 42 | })(jQuery); 43 | -------------------------------------------------------------------------------- /src/services/youtube.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | "use strict"; 3 | 4 | $.fn.lifestream.feeds.youtube = function( config, callback ) { 5 | 6 | var template = $.extend({}, 7 | { 8 | "uploaded": 'uploaded ${title}' 9 | }, 10 | config.template); 11 | 12 | var parseYoutube = function(response) { 13 | var output = []; 14 | 15 | if(!response.videos) {return output;} 16 | 17 | for (var i=0; i${title}' 7 | }, 8 | config.template); 9 | 10 | $.ajax({ 11 | url: "https://api.flickr.com/services/feeds/photos_public.gne?id=" + 12 | config.user + "&lang=en-us&format=json", 13 | dataType: "jsonp", 14 | jsonp: 'jsoncallback', 15 | success: function( data ) { 16 | var output = [], i = 0, j; 17 | 18 | if(data && data.items && data.items.length > 0) { 19 | j = data.items.length; 20 | for( ; i${title} by ${authors}' 7 | }, 8 | config.template), 9 | 10 | parseCiteulike = function( data ) { 11 | var output = [], i = 0, j; 12 | 13 | if(data && data.length && data.length > 0) { 14 | j = data.length; 15 | for( ; i${title}' 7 | }, 8 | config.template); 9 | 10 | var parseSnipplr = function ( input ) { 11 | var output = [], list, i = 0, j, item; 12 | 13 | if ( input.query && input.query.count && input.query.count > 0 && 14 | input.query.results.rss.channel.item ) { 15 | list = input.query.results.rss.channel.item; 16 | j = list.length; 17 | for ( ; i < j; i++) { 18 | item = list[i]; 19 | 20 | output.push({ 21 | date: new Date( item.pubDate ), 22 | config: config, 23 | html: $.tmpl( template.posted, item ) 24 | }); 25 | } 26 | } 27 | 28 | return output; 29 | }; 30 | 31 | $.ajax({ 32 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 33 | 'url="http://snipplr.com/rss/users/' + config.user + '"'), 34 | dataType: "jsonp", 35 | success: function ( data ) { 36 | callback(parseSnipplr(data)); 37 | } 38 | }); 39 | 40 | }; 41 | })(jQuery); -------------------------------------------------------------------------------- /src/services/facebook_page.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | "use strict"; 3 | 4 | $.fn.lifestream.feeds.facebook_page = function( config, callback ) { 5 | 6 | var template = $.extend({}, 7 | { 8 | wall_post: 'posted ${text}' 9 | }, 10 | config.template); 11 | 12 | /** 13 | * Parse the input from facebook 14 | */ 15 | var parseFacebooky = function(response) { 16 | var output = []; 17 | 18 | if (!response.posts || !response.posts.length) { 19 | return output; 20 | } 21 | 22 | for (var i = 0 ;i < response.posts.length; i++){ 23 | var post = response.posts[i]; 24 | 25 | output.push({ 26 | "date": new Date(post.time * 1000), 27 | "config": config, 28 | "html": $.tmpl(template.wall_post, post) 29 | }); 30 | } 31 | callback(output); 32 | }; 33 | 34 | $.ajax({ 35 | url: 'https://facebooky.herokuapp.com/page/' + config.user, 36 | success: parseFacebooky 37 | }); 38 | 39 | // Expose the template. 40 | // We use this to check which templates are available 41 | return { 42 | "template" : template 43 | }; 44 | 45 | }; 46 | })(jQuery); 47 | -------------------------------------------------------------------------------- /src/services/foursquare.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.foursquare = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | checkedin: 'checked in @ ${title}' 7 | }, 8 | config.template), 9 | 10 | parseFoursquare = function( input ) { 11 | var output = [], i = 0, j; 12 | 13 | if(input.query && input.query.count && input.query.count >0) { 14 | j = input.query.count; 15 | for( ; i' + 7 | '${short_url}' 8 | }, 9 | config.template); 10 | 11 | $.ajax({ 12 | url: $.fn.lifestream.createYqlUrl('select data.short_url, data.created, '+ 13 | 'data.title from json where url="' + 14 | 'http://bitly.com/u/' + config.user + '.json"'), 15 | dataType: "jsonp", 16 | success: function( input ) { 17 | var output = [], i = 0, j, list; 18 | if ( input.query && input.query.count && input.query.results.json ) { 19 | list = input.query.results.json; 20 | j = list.length; 21 | for( ; i < j; i++) { 22 | var item = list[i].data; 23 | output.push({ 24 | date: new Date(item.created * 1000), 25 | config: config, 26 | html: $.tmpl( template.created, item ) 27 | }); 28 | } 29 | } 30 | callback(output); 31 | } 32 | }); 33 | 34 | // Expose the template. 35 | // We use this to check which templates are available 36 | return { 37 | "template" : template 38 | }; 39 | 40 | }; 41 | })(jQuery); -------------------------------------------------------------------------------- /src/services/pinboard.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.pinboard = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | bookmarked: 'bookmarked ${title}' 7 | }, 8 | config.template); 9 | 10 | var parsePinboard = function( input ) { 11 | var output = [], list, i = 0, j, item; 12 | 13 | if (input.query && input.query.count && input.query.count > 0) { 14 | list = input.query.results.RDF.item; 15 | j = list.length; 16 | for ( ; i < j; i++) { 17 | item = list[i]; 18 | 19 | output.push({ 20 | date: new Date(item.date), 21 | config: config, 22 | html: $.tmpl( template.bookmarked, item ) 23 | }); 24 | 25 | } 26 | } 27 | 28 | return output; 29 | }; 30 | 31 | $.ajax({ 32 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 33 | 'url="http://feeds.pinboard.in/rss/u:' + config.user + '"'), 34 | dataType: "jsonp", 35 | success: function( data ) { 36 | callback(parsePinboard(data)); 37 | } 38 | }); 39 | 40 | // Expose the template. 41 | // We use this to check which templates are available 42 | return { 43 | "template" : template 44 | }; 45 | 46 | }; 47 | })(jQuery); -------------------------------------------------------------------------------- /src/services/slideshare.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.slideshare = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | uploaded: 'uploaded a presentation ${title}' 7 | }, 8 | config.template); 9 | 10 | var parseSlideshare = function( input ) { 11 | var output = [], list, i = 0, j, item; 12 | 13 | if (input.query && input.query.count && input.query.count > 0) { 14 | list = input.query.results.rss.channel.item; 15 | j = list.length; 16 | for ( ; i < j; i++) { 17 | item = list[i]; 18 | 19 | output.push({ 20 | date: new Date(item.pubDate), 21 | config: config, 22 | html: $.tmpl( template.uploaded, item ) 23 | }); 24 | 25 | } 26 | } 27 | 28 | return output; 29 | }; 30 | 31 | $.ajax({ 32 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 33 | 'url="http://www.slideshare.net/rss/user/' + config.user + '"'), 34 | dataType: "jsonp", 35 | success: function( data ) { 36 | callback(parseSlideshare(data)); 37 | } 38 | }); 39 | 40 | // Expose the template. 41 | // We use this to check which templates are available 42 | return { 43 | "template" : template 44 | }; 45 | 46 | }; 47 | })(jQuery); -------------------------------------------------------------------------------- /src/services/mlkshk.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.mlkshk = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | posted: 'posted ${title}' 7 | }, 8 | config.template); 9 | 10 | 11 | var parseMlkshk = function ( input ) { 12 | 13 | var output = [], list, i = 0, j, item; 14 | 15 | if ( input.query && input.query.count && input.query.count > 0 && 16 | input.query.results.rss.channel.item ) { 17 | list = input.query.results.rss.channel.item; 18 | j = list.length; 19 | for ( ; i < j; i++) { 20 | item = list[i]; 21 | output.push({ 22 | date: new Date( item.pubDate ), 23 | config: config, 24 | html: $.tmpl( template.posted, item ) 25 | }); 26 | } 27 | } 28 | return output; 29 | }; 30 | 31 | $.ajax({ 32 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 33 | 'url="http://mlkshk.com/user/' + config.user + '/rss"'), 34 | dataType: "jsonp", 35 | success: function ( data ) { 36 | callback(parseMlkshk(data)); 37 | } 38 | }); 39 | 40 | // Expose the template. 41 | // We use this to check which templates are available 42 | return { 43 | "template" : template 44 | }; 45 | 46 | }; 47 | })(jQuery); -------------------------------------------------------------------------------- /src/services/atom.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.atom = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | posted: 'posted ${title.content}' 7 | }, 8 | config.template), 9 | 10 | /** 11 | * Parse the input from atom feed 12 | */ 13 | parseAtom = function( input ) { 14 | var output = [], list = [], i = 0, j = 0; 15 | if(input.query && input.query.count && input.query.count > 0) { 16 | list = input.query.results.feed.entry; 17 | j = list.length; 18 | 19 | for( ; i${title}' 7 | }, 8 | config.template), 9 | 10 | parsePocket = function( input ) { 11 | var output = [], list, i = 0, j; 12 | 13 | if(input.query && input.query.results) { 14 | list = input.query.results.rss.channel.item; 15 | j = list.length; 16 | for( ; i${title}' 7 | }, 8 | config.template); 9 | 10 | $.ajax({ 11 | url: $.fn.lifestream.createYqlUrl( 12 | 'select title,link,pubDate from rss where ' + 13 | 'url="http://backend.deviantart.com/rss.xml?q=gallery%3A' + 14 | encodeURIComponent(config.user) + 15 | '&type=deviation' + 16 | '" | unique(field="title")' 17 | ), 18 | dataType: 'jsonp', 19 | success: function( resp ) { 20 | var output = [], 21 | items, item, 22 | i = 0, j; 23 | if (resp.query && resp.query.count > 0) { 24 | items = resp.query.results.item; 25 | j = items.length; 26 | for ( ; i < j; i++) { 27 | item = items[i]; 28 | output.push({ 29 | date: new Date(item.pubDate), 30 | config: config, 31 | html: $.tmpl( template.posted, item ) 32 | }); 33 | } 34 | } 35 | callback(output); 36 | } 37 | }); 38 | 39 | // Expose the template. 40 | // We use this to check which templates are available 41 | return { 42 | "template" : template 43 | }; 44 | 45 | }; 46 | })(jQuery); -------------------------------------------------------------------------------- /src/services/instapaper.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.instapaper = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | loved: 'loved ${title}' 7 | }, 8 | config.template), 9 | 10 | parseInstapaper = function( input ) { 11 | var output = [], list, i = 0, j, item; 12 | 13 | if(input.query && input.query.count && input.query.count > 0 && 14 | input.query.results.rss.channel.item) { 15 | 16 | list = input.query.results.rss.channel.item; 17 | j = list.length; 18 | for( ; i${title}' 7 | }, 8 | config.template); 9 | 10 | var parsePosterous = function ( input ) { 11 | var output = [], list, i = 0, j, item; 12 | 13 | if ( input.query && input.query.count && input.query.count > 0 && 14 | input.query.results.rss.channel.item ) { 15 | list = input.query.results.rss.channel.item; 16 | j = list.length; 17 | for ( ; i < j; i++) { 18 | item = list[i]; 19 | 20 | output.push({ 21 | date: new Date( item.pubDate ), 22 | config: config, 23 | html: $.tmpl( template.posted, item ) 24 | }); 25 | } 26 | } 27 | 28 | return output; 29 | }; 30 | 31 | $.ajax({ 32 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 33 | 'url="http://' + config.user + '.posterous.com/rss.xml"'), 34 | dataType: "jsonp", 35 | success: function ( data ) { 36 | callback(parsePosterous(data)); 37 | } 38 | }); 39 | 40 | // Expose the template. 41 | // We use this to check which templates are available 42 | return { 43 | "template" : template 44 | }; 45 | 46 | }; 47 | })(jQuery); -------------------------------------------------------------------------------- /src/services/zotero.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.zotero = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | flagged: 'flagged ${title} by ${creatorSummary}' 7 | }, 8 | config.template), 9 | 10 | parseZotero = function( input ) { 11 | var output = [], list, i = 0, j; 12 | 13 | if(input.query && input.query.count && input.query.count > 0) { 14 | list = input.query.results.feed.entry; 15 | j = list.length; 16 | for( ; i${title}' 9 | }, 10 | config.template), 11 | 12 | parseFancy = function( input ) { 13 | var output = [], i = 0, j; 14 | 15 | if(input.query && input.query.count && input.query.count > 0) { 16 | j = input.query.count; 17 | for( ; i${title[0]}' 7 | }, 8 | config.template), 9 | 10 | parseDailymotion = function( input ) { 11 | 12 | var output = [], list, i = 0, j, item; 13 | 14 | if ( input.query && input.query.count && input.query.count > 0 && 15 | input.query.results.rss.channel.item ) { 16 | list = input.query.results.rss.channel.item; 17 | j = list.length; 18 | for ( ; i < j; i++) { 19 | item = list[i]; 20 | output.push({ 21 | date: new Date ( item.pubDate ), 22 | config: config, 23 | html: $.tmpl( template.uploaded, item ) 24 | }); 25 | } 26 | } 27 | 28 | return output; 29 | 30 | }; 31 | 32 | $.ajax({ 33 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 34 | 'url="http://www.dailymotion.com/rss/user/' + config.user + '"'), 35 | dataType: "jsonp", 36 | success: function( data ) { 37 | callback(parseDailymotion(data)); 38 | } 39 | }); 40 | 41 | // Expose the template. 42 | // We use this to check which templates are available 43 | return { 44 | "template" : template 45 | }; 46 | 47 | }; 48 | })(jQuery); -------------------------------------------------------------------------------- /src/services/formspring.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.formspring = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | answered: 'answered a question ${title}' 7 | }, 8 | config.template); 9 | 10 | var parseFormspring = function ( input ) { 11 | var output = [], list, i = 0, j, item; 12 | 13 | if ( input.query && input.query.count && input.query.count > 0 && 14 | input.query.results.rss.channel.item ) { 15 | list = input.query.results.rss.channel.item; 16 | j = list.length; 17 | for ( ; i < j; i++) { 18 | item = list[i]; 19 | 20 | output.push({ 21 | date: new Date( item.pubDate ), 22 | config: config, 23 | html: $.tmpl( template.answered, item ) 24 | }); 25 | } 26 | } 27 | 28 | return output; 29 | }; 30 | 31 | $.ajax({ 32 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 33 | 'url="http://www.formspring.me/profile/' + config.user + '.rss"'), 34 | dataType: "jsonp", 35 | success: function ( data ) { 36 | callback(parseFormspring(data)); 37 | } 38 | }); 39 | 40 | // Expose the template. 41 | // We use this to check which templates are available 42 | return { 43 | "template" : template 44 | }; 45 | 46 | }; 47 | })(jQuery); -------------------------------------------------------------------------------- /src/services/miso.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.miso = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | watched: 'checked in to ${title}' 7 | }, 8 | config.template), 9 | 10 | /** 11 | * Parse the input from rss feed 12 | */ 13 | parseMiso = function( input ) { 14 | var output = [], list, i = 0, j; 15 | if(input.query && input.query.count && input.query.count > 0) { 16 | list = input.query.results.rss.channel.item; 17 | j = list.length; 18 | for( ; i' + 8 | '${book.title} by ${book.author_fl} to my library' 9 | }, 10 | config.template), 11 | 12 | parseLibraryThing = function( input ) { 13 | var output = [], i = ""; 14 | 15 | if(input.books) { 16 | // LibraryThing returns a hash that maps id to Book objects 17 | // which leads to the following slightly weird for loop. 18 | for (i in input.books) { 19 | if (input.books.hasOwnProperty(i)) { 20 | var book = input.books[i]; 21 | output.push({ 22 | date : new Date(book.entry_stamp * 1000), 23 | config : config, 24 | html : $.tmpl(template.book, {book : book}), 25 | url : 'http://www.librarything.com/profile/' + config.user 26 | }); 27 | } 28 | } 29 | } 30 | return output; 31 | }; 32 | 33 | $.ajax({ 34 | url: 'https://www.librarything.com/api_getdata.php?booksort=entry_REV&userid=' + config.user, 35 | dataType: 'jsonp', 36 | success: function( data ) { 37 | callback(parseLibraryThing(data)); 38 | } 39 | }); 40 | 41 | return { 42 | "template" : template 43 | }; 44 | 45 | }; 46 | })(jQuery); 47 | -------------------------------------------------------------------------------- /src/services/mendeley.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.mendeley = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | flagged1: 'flagged ${title}', 7 | flagged2: 'flagged ${title}' 8 | }, 9 | config.template), 10 | 11 | parseMendeley = function( input ) { 12 | var output = [], list, i = 0, j; 13 | 14 | if(input.query && input.query.count && input.query.count > 0) { 15 | list = input.query.results.rss.channel.item; 16 | j = list.length; 17 | for( ; i${name} by ' + 7 | '${artist.name}' 8 | }, 9 | config.template), 10 | 11 | parseLastfm = function( input ) { 12 | var output = [], list, i = 0, j; 13 | 14 | if(input.query && input.query.count && input.query.count > 0 && 15 | input.query.results.lovedtracks && 16 | input.query.results.lovedtracks.track) { 17 | list = input.query.results.lovedtracks.track; 18 | j = list.length; 19 | for( ; i${title}' 9 | }, 10 | config.template); 11 | 12 | $.ajax({ 13 | url: "https://" + language + 14 | ".wikipedia.org/w/api.php?action=query&ucuser=" + 15 | config.user + "&list=usercontribs&ucdir=older&format=json", 16 | dataType: "jsonp", 17 | success: function( data ) { 18 | var output = [], i = 0, j; 19 | 20 | if(data && data.query.usercontribs) { 21 | j = data.query.usercontribs.length; 22 | for( ; i${title} by ${artist}', 9 | history: 'listened to ${title} by ${artist}' 10 | }, 11 | config.template); 12 | 13 | $.ajax({ 14 | url: "http://hypem.com/playlist/" + config.type + "/" + config.user + "/json/1/data.js", 15 | dataType: "json", 16 | success: function( data ) { 17 | var output = [], i = 0, j = -1; 18 | for (var k in data) { 19 | if (data.hasOwnProperty(k)) { 20 | j++; 21 | } 22 | } 23 | if (data && j > 0) { 24 | for( ; i < j; i++) { 25 | var item = data[i]; 26 | output.push({ 27 | date: new Date( (config.type === "history" ? item.dateplayed : item.dateloved) * 1000 ), 28 | config: config, 29 | html: $.tmpl( (config.type === "history" ? template.history : template.loved) , item ) 30 | }); 31 | } 32 | } 33 | callback(output); 34 | } 35 | }); 36 | 37 | // Expose the template. 38 | // We use this to check which templates are available 39 | return { 40 | "template" : template 41 | }; 42 | 43 | }; 44 | })(jQuery); -------------------------------------------------------------------------------- /src/services/wordpress.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.wordpress = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | posted: 'posted ${title}' 7 | }, 8 | config.template); 9 | 10 | var parseWordpress = function ( input ) { 11 | var output = [], list, i = 0, j, item; 12 | 13 | if ( input.query && input.query.count && input.query.count > 0 && 14 | input.query.results.rss.channel.item ) { 15 | list = input.query.results.rss.channel.item; 16 | j = list.length; 17 | for ( ; i < j; i++) { 18 | item = list[i]; 19 | 20 | output.push({ 21 | date: new Date( item.pubDate ), 22 | config: config, 23 | html: $.tmpl( template.posted, item ) 24 | }); 25 | } 26 | } 27 | 28 | return output; 29 | }; 30 | 31 | var url = ""; 32 | 33 | if ( config.user ){ 34 | // If the config.user property starts with http:// we assume that is the 35 | // full url to the user his blog. We append the /feed to the url. 36 | url = (config.user.indexOf('http://') === 0 ? 37 | config.user + '/feed' : 38 | 'http://' + config.user + '.wordpress.com/feed'); 39 | $.ajax({ 40 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 41 | 'url="' + url + '"'), 42 | dataType: "jsonp", 43 | success: function ( data ) { 44 | callback(parseWordpress(data)); 45 | } 46 | }); 47 | } 48 | 49 | // Expose the template. 50 | // We use this to check which templates are available 51 | return { 52 | "template" : template 53 | }; 54 | 55 | }; 56 | })(jQuery); -------------------------------------------------------------------------------- /src/services/disqus.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.disqus = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | post: 'commented on ${thread.title}', 7 | thread_like: 'liked ${thread.title}' 8 | }, 9 | config.template), 10 | 11 | parseDisqus = function( input ) { 12 | var output = [], i = 0, j, item; 13 | 14 | if(input) { 15 | j = input.length; 16 | for( ; i${actor.displayName}' + 7 | ' has posted a new entry ${title} ' + 9 | '${object.replies.totalItems} replies, ' + 10 | '${object.plusoners.totalItems} +1s, ' + 11 | '${object.resharers.totalItems} Reshares' 12 | }, 13 | config.template), 14 | 15 | parseGooglePlus = function( input ) { 16 | var output = [], i = 0, j, item; 17 | 18 | if(input && input.items) { 19 | j = input.items.length; 20 | for( ; i${title}' 7 | }, 8 | config.template), 9 | 10 | /** 11 | * Get the link 12 | * @param {Object} channel 13 | * @return {String} 14 | */ 15 | getChannelUrl = function(channel){ 16 | var i = 0, j = channel.link.length; 17 | 18 | for( ; i < j; i++) { 19 | var link = channel.link[i]; 20 | if( typeof link === 'string' ) { 21 | return link; 22 | } 23 | } 24 | 25 | return ''; 26 | }, 27 | 28 | /** 29 | * Parse the input from rss feed 30 | */ 31 | parseRSS = function( input ) { 32 | var output = [], list = [], i = 0, j = 0, url = ''; 33 | if(input.query && input.query.count && input.query.count > 0) { 34 | list = input.query.results.rss.channel.item; 35 | j = list.length; 36 | url = getChannelUrl(input.query.results.rss.channel); 37 | 38 | for( ; i${text} - ${title}' 7 | }, 8 | config.template); 9 | 10 | var parseStackoverflowItem = function( item ) { 11 | var text="", title="", link="", 12 | stackoverflow_link = "http://stackoverflow.com/users/" + config.user, 13 | question_link = "http://stackoverflow.com/questions/"; 14 | 15 | if(item.timeline_type === "badge") { 16 | link = stackoverflow_link + "?tab=reputation"; 17 | } 18 | 19 | text = item.timeline_type; 20 | title = item.title || item.detail || ""; 21 | link = link || question_link + item.post_id; 22 | 23 | return { 24 | link: link, 25 | title: title, 26 | text: text 27 | }; 28 | }, 29 | convertDate = function( date ) { 30 | return new Date(date * 1000); 31 | }; 32 | 33 | $.ajax({ 34 | url: "https://api.stackexchange.com/2.1/users/" + config.user + 35 | "/timeline?site=stackoverflow", 36 | dataType: "jsonp", 37 | jsonp: 'jsonp', 38 | success: function( data ) { 39 | var output = []; 40 | 41 | if(data && data.items) { 42 | for(var i = 0 ; i < data.items.length; i++) { 43 | var item = data.items[i]; 44 | output.push({ 45 | date: convertDate(item.creation_date), 46 | config: config, 47 | html: $.tmpl( template.global, parseStackoverflowItem(item) ) 48 | }); 49 | } 50 | } 51 | 52 | callback(output); 53 | } 54 | }); 55 | 56 | // Expose the template. 57 | // We use this to check which templates are available 58 | return { 59 | "template" : template 60 | }; 61 | 62 | }; 63 | })(jQuery); 64 | -------------------------------------------------------------------------------- /src/services/blogger.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.blogger = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | posted: 'posted ${title}' 7 | }, 8 | config.template), 9 | 10 | parseBlogger = function ( input ) { 11 | var output = [], list, i = 0, j, item, k, l; 12 | 13 | if ( input.query && input.query.count && input.query.count > 0 && 14 | input.query.results.feed.entry ) { 15 | list = input.query.results.feed.entry; 16 | j = list.length; 17 | for ( ; i < j; i++) { 18 | item = list[i]; 19 | 20 | if( !item.origLink ) { 21 | k = 0; 22 | l = item.link.length; 23 | for ( ; k < l ; k++ ) { 24 | if( item.link[k].rel === 'alternate' ) { 25 | item.origLink = item.link[k].href; 26 | } 27 | } 28 | } 29 | // ignore items that have no link. 30 | if ( item.origLink ){ 31 | if( item.title.content ) { 32 | item.title = item.title.content; 33 | } 34 | 35 | output.push({ 36 | date: new Date( item.published ), 37 | config: config, 38 | html: $.tmpl( template.posted, item ) 39 | }); 40 | } 41 | } 42 | } 43 | 44 | return output; 45 | }; 46 | 47 | $.ajax({ 48 | url: $.fn.lifestream.createYqlUrl('select * from xml where url="http://' + 49 | config.user + '.blogspot.com/feeds/posts/default"'), 50 | dataType: "jsonp", 51 | success: function ( data ) { 52 | callback(parseBlogger(data)); 53 | } 54 | }); 55 | 56 | // Expose the template. 57 | // We use this to check which templates are available 58 | return { 59 | "template" : template 60 | }; 61 | 62 | }; 63 | })(jQuery); -------------------------------------------------------------------------------- /src/services/quora.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.quora = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | posted: '${title}' 7 | }, 8 | config.template), 9 | 10 | /** 11 | * Get the link 12 | * Straigth copy from RSS 13 | * 14 | * @param {Object} channel 15 | * @return {String} 16 | */ 17 | getChannelUrl = function(channel){ 18 | var i = 0, j = channel.link.length; 19 | 20 | for( ; i < j; i++) { 21 | var link = channel.link[i]; 22 | if( typeof link === 'string' ) { 23 | return link; 24 | } 25 | } 26 | 27 | return ''; 28 | }, 29 | 30 | /** 31 | * Parse the input from quora feed 32 | */ 33 | parseRSS = function( input ) { 34 | var output = [], list = [], i = 0, j = 0, url = ''; 35 | if(input.query && input.query.count && input.query.count > 0) { 36 | list = input.query.results.rss.channel.item; 37 | j = list.length; 38 | url = getChannelUrl(input.query.results.rss.channel); 39 | for( ; i${title}' 9 | }, config.template), 10 | jsonpCallbackName = 'jlsLinkedinCallback' + config.user, 11 | 12 | createYql = function(){ 13 | var query = 'SELECT * FROM feed WHERE url="' + config.url + '"'; 14 | 15 | // I bet some will not read the instructions 16 | if(config.user) { 17 | query += ' AND link LIKE "%' + config.user + '%"'; 18 | } 19 | 20 | return query; 21 | }, 22 | 23 | parseLinkedinItem = function(item) { 24 | return { 25 | 'date': new Date(item.pubDate), 26 | 'config': config, 27 | 'html': $.tmpl(template.posted, item) 28 | }; 29 | }; 30 | 31 | // !!! Global function for jsonp callback 32 | window[jsonpCallbackName] = function(input) { 33 | var output = [], i = 0; 34 | 35 | if(input.query && input.query.count && input.query.count > 0) { 36 | if (input.query.count === 1) { 37 | output.push(parseLinkedinItem(input.query.results.item)); 38 | } else { 39 | for(i; i < input.query.count; i++) { 40 | var item = input.query.results.item[i]; 41 | output.push(parseLinkedinItem(item)); 42 | } 43 | } 44 | } 45 | 46 | callback(output); 47 | }; 48 | 49 | $.ajax({ 50 | 'url': $.fn.lifestream.createYqlUrl(createYql()), 51 | 'cache': true, 52 | 'data': { 53 | // YQL will cache this for 5 minutes 54 | '_maxage': 300 55 | }, 56 | 'dataType': 'jsonp', 57 | // let YQL cache 58 | 'jsonpCallback': jsonpCallbackName 59 | }); 60 | 61 | // Expose the template. 62 | // We use this to check which templates are available 63 | return { 64 | 'template': template 65 | }; 66 | }; 67 | })(jQuery); 68 | -------------------------------------------------------------------------------- /download/js/jquery.notifications.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Notifications plugin 1.1 3 | * 4 | * http://programmingmind.com 5 | * 6 | * Copyright (c) 2009 David Ang 7 | * 8 | * 9 | * Dual licensed under the MIT and GPL licenses: 10 | * http://www.opensource.org/licenses/mit-license.php 11 | * http://www.gnu.org/licenses/gpl.html 12 | * 13 | * Version Changes 14 | * 15 | * 1.1 8/17/2008 16 | * - Allow users to choose between slide or fade effect 17 | * - Fixed fadeSpeed option settings 18 | * 19 | * 1.0 8/9/2008 20 | * - Initial release 21 | */(function(a){function e(a){var b;return function(c,d){b=clearTimeout(b),c&&(b=setTimeout(function(){c(d)},a));return b}}function d(b){b.effect=="fade"?a("#jquery-notifications-"+b.counter).fadeOut(b.fadeSpeed,function(){a(this).remove()}):a("#jquery-notifications-"+b.counter).slideUp(b.fadeSpeed,function(){a(this).remove()})}var b,c=0;a.notifications=function(f,g){c++;var h=a.extend({},a.notifications.defaults,g);b||(b=a('
').appendTo(document.body));var i=a('

'+f+"

").hide().appendTo("#jquery-notifications");h.effect=="fade"?i.fadeIn(h.fadeSpeed):i.slideDown(h.fadeSpeed);if(h.stick){var j=a(''+h.close+"").click(function(){h.effect=="fade"?a(this.parentNode).fadeOut(h.fadeSpeed,function(){a(this).remove()}):a(this.parentNode).slideUp(h.fadeSpeed,function(){a(this).remove()})});j.appendTo(i)}if(!h.stick){var k=e(h.timeout);k(d,{counter:c,effect:h.effect,fadeSpeed:h.fadeSpeed})}a("#errorExplanation").length&&(a("#errorExplanation").hide(),a("#errorExplanation li").each(function(b){a.n.error(a(this).text())}))},a.notifications.success=function(b,c){return a.notifications(b,a.extend({},c,{type:"success"}))},a.notifications.error=function(b,c){return a.notifications(b,a.extend({stick:!0},c,{type:"error"}))},a.notifications.warning=function(b,c){return a.notifications(b,a.extend({},c,{type:"warning"}))},a.notifications.defaults={type:"notice",timeout:1e4,stick:!1,fadeSpeed:800,close:"x",effect:"fade"},a.n=a.notifications})(jQuery) -------------------------------------------------------------------------------- /src/services/iusethis.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.iusethis = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | global: '${action} ${what} on (${os})' 7 | }, 8 | config.template); 9 | 10 | var parseIusethis = function( input ) { 11 | var output = [], list, i, j, k, l, m = 0, n, item, title, actions, 12 | action, what, os, oss = ["iPhone", "OS X", "Windows"]; 13 | 14 | if (input.query && input.query.count && input.query.count > 0 && 15 | input.query.results.rss) { 16 | n = input.query.results.rss.length; 17 | actions = ['started using', 'stopped using', 'stopped loving', 18 | 'Downloaded', 'commented on', 'updated entry for', 19 | 'started loving', 'registered']; 20 | l = actions.length; 21 | 22 | for( ; m < n; m++) { 23 | 24 | os = oss[m]; 25 | list = input.query.results.rss[m].channel.item; 26 | i = 0; 27 | j = list.length; 28 | 29 | for ( ; i < j; i++) { 30 | item = list[i]; 31 | title = item.title.replace(config.user + ' ', ''); 32 | k = 0; 33 | 34 | for( ; k < l; k++) { 35 | if(title.indexOf(actions[k]) > -1) { 36 | action = actions[k]; 37 | break; 38 | } 39 | } 40 | 41 | what = title.split(action); 42 | 43 | output.push({ 44 | date: new Date(item.pubDate), 45 | config: config, 46 | html: $.tmpl( template.global, { 47 | action: action.toLowerCase(), 48 | link: item.link, 49 | what: what[1], 50 | os: os 51 | } ) 52 | }); 53 | } 54 | } 55 | } 56 | 57 | return output; 58 | }; 59 | 60 | $.ajax({ 61 | url: $.fn.lifestream.createYqlUrl('select * from xml where ' + 62 | 'url="http://iphone.iusethis.com/user/feed.rss/' + config.user + 63 | '" or ' + 64 | 'url="http://osx.iusethis.com/user/feed.rss/' + config.user + 65 | '" or ' + 66 | 'url="http://win.iusethis.com/user/feed.rss/' + config.user + '"'), 67 | dataType: "jsonp", 68 | success: function( data ) { 69 | callback(parseIusethis(data)); 70 | } 71 | }); 72 | 73 | // Expose the template. 74 | // We use this to check which templates are available 75 | return { 76 | "template" : template 77 | }; 78 | 79 | }; 80 | })(jQuery); -------------------------------------------------------------------------------- /COMMITTERS: -------------------------------------------------------------------------------- 1 | People that have contributed to the jQuery Lifestream project: 2 | 3 | 4 | Real Name (ordered by last name) | Github Username 5 | 6 | Devin Berg | devinberg 7 | website: http://www.devinberg.com/ 8 | googleplus: http://plus.google.com/106130596573742041459 9 | 10 | Ethan Brown | etano 11 | twitter: ethanwbrown 12 | website: http://etano.net/ 13 | location: Norman, Oklahoma, USA 14 | 15 | David Cheng | davidlimcheng 16 | location: Berkeley, USA 17 | 18 | Dinesh Copoosamy | dineshcooper 19 | twitter: dineshcooper 20 | website: http://dinesh.co.za/ 21 | location: South Africa 22 | 23 | Mikhail Dimitrov | skylamer 24 | website: http://gplus.to/skylamer 25 | location: Bulgaria 26 | 27 | Blake Embrey | blakeembrey 28 | twitter: blakeembrey 29 | website: http://blakeembrey.com/ 30 | location: Queensland, Australia 31 | 32 | Giulio Mainardi | mgiulio 33 | twitter: mgiulio 34 | website: http://mgiulio.altervista.org/ 35 | location: Italy 36 | 37 | Hiromitsu Miyanishi | hiromitz 38 | twitter: hiromitz 39 | website: http://hiromitz.jimdo.com/ 40 | location: Japan 41 | 42 | Simon Gaeremynck | simong 43 | twitter: Simon_Gee 44 | website: http://blog.gaeremynck.com/ 45 | location: Belgium 46 | 47 | Joshua Hawxwell | hawx 48 | twitter: hawx 49 | website: http://hawx.me/ 50 | location: Great Britain 51 | 52 | Yasuhiro Matsumoto | mattn 53 | twitter: mattn_jp 54 | website: http://mattn.kaoriya.net/ 55 | location: Japan 56 | 57 | Ryan Olson | thatryan 58 | twitter: ryanolson 59 | website: http://thatryan.com/ 60 | location: Bay Area, CA, USA 61 | 62 | Armin Rosu | arminrosu 63 | twitter: arminrosu 64 | website: http://armin.ro/ 65 | location: Bucharest, Romania 66 | 67 | Erik Ostrom | eostrom 68 | website: http://echographia.com/ 69 | location: Minneapolis, MN, USA 70 | 71 | Jasson Qasqant | yeco 72 | twitter: yeco 73 | website: http://elbleg.com 74 | location: Costa Rica 75 | 76 | Eric R | NumEricR 77 | twitter: NumEricR 78 | location: France 79 | 80 | Sam Tardif | samtardif 81 | location: Sydney, Australia 82 | 83 | Bill Turner | billturner 84 | twitter: billturner 85 | location: Pittsburgh, PA, USA 86 | 87 | Christian Vuerings | christianvuerings 88 | twitter: christianvuer 89 | website: http://www.christianvuerings.com 90 | location: Belgium 91 | 92 | Ethan Zimmerman | thebinarypenguin 93 | twitter: BinaryPenguin 94 | website: http://thebinarypenguin.com/ 95 | location: Blairsville, GA, USA 96 | -------------------------------------------------------------------------------- /src/services/reddit.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.reddit = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | commented: 'commented ' + 9 | '(${score}) in ${item.data.subreddit}', 11 | created: '' + 12 | 'created new thread (${score}) in ' + 13 | '' + 14 | '${item.data.subreddit}' 15 | }, 16 | config.template); 17 | 18 | /** 19 | * Parsed one item from the Reddit API. 20 | * item.kind == t1 is a reply, t2 is a new thread 21 | */ 22 | var parseRedditItem = function( item ) { 23 | 24 | var score = item.data.ups - item.data.downs, 25 | pass = { 26 | item: item, 27 | score: (score > 0) ? "+" + score : score 28 | }; 29 | 30 | // t1 = reply, t3 = new thread 31 | if (item.kind === "t1") { 32 | return $.tmpl( template.commented, pass ); 33 | } 34 | else if (item.kind === "t3") { 35 | return $.tmpl( template.created, pass ); 36 | } 37 | 38 | }, 39 | /** 40 | * Reddit date's are simple epochs. 41 | * seconds*1000 = milliseconds 42 | */ 43 | convertDate = function( date ) { 44 | return new Date(date * 1000); 45 | }; 46 | 47 | $.ajax({ 48 | url: "https://pay.reddit.com/user/" + config.user + ".json", 49 | dataType: "jsonp", 50 | jsonp:"jsonp", 51 | success: function( data ) { 52 | var output = [], i = 0, j; 53 | 54 | if(data && data.data && data.data.children && 55 | data.data.children.length > 0) { 56 | j = data.data.children.length; 57 | for( ; i object { 52 | vertical-align: middle; 53 | } 54 | /* jQuery Notifications plugin - http://programmingmind.com */ 55 | /* notification container */ 56 | #jquery-notifications { 57 | position: fixed; /*was relative*/ 58 | width: 25%; 59 | right: 0; 60 | /*width: 100%; 61 | left: 0;*/ 62 | top: 0; 63 | z-index: 100000; 64 | } 65 | #jquery-notifications p { 66 | text-align: center; 67 | position: relative; 68 | margin: 0; 69 | padding: 5px; 70 | padding-left: 10px; 71 | border-bottom: 2px solid; 72 | /* style property for the close text */ 73 | } 74 | #jquery-notifications p a { 75 | position: absolute; 76 | right: 10px; 77 | margin-right: 10px; 78 | color: black; 79 | text-decoration: none; 80 | border: 1px solid black; 81 | padding-right: 5px; 82 | padding-left: 5px; 83 | } 84 | #jquery-notifications .notice { 85 | background: #6c9ffc; 86 | color: #ffffff; /*#061a72;*/ 87 | border-color: #061a72; 88 | opacity: 0.9; 89 | } 90 | #jquery-notifications .success { 91 | background: #96f96f; 92 | color: #045419; 93 | border-color: #045419; 94 | } 95 | #jquery-notifications .warning { 96 | background: #f7ae57; 97 | color: #753903; 98 | border-color: #753903; 99 | } 100 | #jquery-notifications .error { 101 | background: #f97c6f; 102 | color: #570f01; 103 | border-color: #570f01; 104 | } -------------------------------------------------------------------------------- /src/services/vimeo.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.vimeo = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | liked: 'liked ${title}', 7 | posted: 'posted ${title}' 8 | }, 9 | config.template), 10 | 11 | parseVimeo = function( input, item_type ) { 12 | var output = [], i = 0, j, item, type = item_type || 'liked', date, description; 13 | 14 | if (input) { 15 | j = input.length; 16 | for( ; i < j; i++) { 17 | item = input[i]; 18 | if (type === 'posted') { 19 | date = new Date( item.upload_date.replace(' ', 'T') ); 20 | } else { 21 | date = new Date( item.liked_on.replace(' ', 'T') ); 22 | } 23 | 24 | if (item.description) { 25 | description = item.description.replace(/"/g, "'").replace( /<.+?>/gi, ''); 26 | } else { 27 | description = ''; 28 | } 29 | 30 | output.push({ 31 | date: date, 32 | config: config, 33 | html: $.tmpl( template[type], { 34 | url: item.url, 35 | description: item.description ? item.description 36 | .replace(/"/g, "'") 37 | .replace( /<.+?>/gi, '') : '', 38 | title: item.title 39 | }) 40 | }); 41 | } 42 | } 43 | 44 | return output; 45 | }; 46 | 47 | $.ajax({ 48 | url: $.fn.lifestream.createYqlUrl('SELECT * FROM xml WHERE ' + 49 | 'url="http://vimeo.com/api/v2/' + config.user + '/likes.xml" OR ' + 50 | 'url="http://vimeo.com/api/v2/' + config.user + '/videos.xml"'), 51 | dataType: 'jsonp', 52 | success: function( response ) { 53 | var output = []; 54 | 55 | // check for likes & parse 56 | if ( response.query.results.videos[0] != null && 57 | response.query.results.videos[0].video.length > 0 ) { 58 | output = output.concat(parseVimeo( 59 | response.query.results.videos[0].video 60 | )); 61 | } 62 | 63 | // check for uploads & parse 64 | if ( response.query.results.videos[1] != null && 65 | response.query.results.videos[1].video.length > 0 ) { 66 | output = output.concat( 67 | parseVimeo(response.query.results.videos[1].video, 'posted') 68 | ); 69 | } 70 | 71 | callback(output); 72 | } 73 | }); 74 | 75 | // Expose the template. 76 | // We use this to check which templates are available 77 | return { 78 | 'template' : template 79 | }; 80 | 81 | }; 82 | })(jQuery); -------------------------------------------------------------------------------- /src/services/bitbucket.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.lifestream.feeds.bitbucket = function( config, callback ) { 3 | 4 | var template = $.extend({}, 5 | { 6 | commit: 'committed at ${owner}/${name}', 7 | pullrequest_fulfilled: 'fulfilled a pull request at ${owner}/${name}', 8 | pullrequest_rejected: 'rejected a pull request at ${owner}/${name}', 9 | pullrequest_created: 'created a pull request at ${owner}/${name}', 10 | create: 'created a new project at ${owner}/${name}', 11 | fork: 'forked ${owner}/${name}' 12 | }, 13 | config.template), 14 | 15 | supported_events = [ 16 | "commit", 17 | "pullrequest_fulfilled", 18 | "pullrequest_rejected", 19 | "pullrequest_created", 20 | "create", 21 | "fork" 22 | ], 23 | 24 | parseBitbucketStatus = function( status ) { 25 | if ($.inArray(status.event, supported_events) !== -1) { 26 | //bb generates some weird create events, check for repository 27 | if (status.repository) { 28 | if (status.event === "commit") { 29 | return $.tmpl( template.commit, { 30 | owner: status.repository.owner, 31 | name: status.repository.name, 32 | node: status.node 33 | }); 34 | } else { 35 | return $.tmpl( template[status.event], { 36 | owner: status.repository.owner, 37 | name: status.repository.name 38 | }); 39 | } 40 | } 41 | } 42 | }, 43 | 44 | parseBitbucket = function( input ) { 45 | var output = []; 46 | if (input.query && input.query.count && input.query.count > 0) { 47 | $.each(input.query.results.json, function () { 48 | output.push({ 49 | date: new Date(this.events.created_on.replace(/-/g, '/')), 50 | config: config, 51 | html: parseBitbucketStatus(this.events) 52 | }); 53 | }); 54 | } 55 | 56 | return output; 57 | }; 58 | 59 | $.ajax({ 60 | url: $.fn.lifestream.createYqlUrl('select events.event,' + 61 | 'events.node, events.created_on,' + 62 | 'events.repository.name, events.repository.owner ' + 63 | 'from json where url = "https://api.bitbucket.org/1.0/users/' + 64 | config.user + '/events/"'), 65 | dataType: 'jsonp', 66 | success: function( data ) { 67 | callback(parseBitbucket(data)); 68 | } 69 | }); 70 | 71 | return { 72 | 'template' : template 73 | }; 74 | }; 75 | })(jQuery); -------------------------------------------------------------------------------- /download/js/downloadify.min.js: -------------------------------------------------------------------------------- 1 | /* Downloadify 0.2 (c) 2009 by Douglas Neiner. Licensed under the MIT license */ 2 | /* See http://github.com/dcneiner/Downloadify for license and more info */ 3 | (function(){Downloadify=window.Downloadify={queue:{},uid:new Date().getTime(),getTextForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getData();return""},getFileNameForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getFilename();return""},getDataTypeForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getDataType();return""},saveComplete:function(a){var b=Downloadify.queue[a];if(b)b.complete();return true},saveCancel:function(a){var b=Downloadify.queue[a];if(b)b.cancel();return true},saveError:function(a){var b=Downloadify.queue[a];if(b)b.error();return true},addToQueue:function(a){Downloadify.queue[a.queue_name]=a},getUID:function(a){if(a.id=="")a.id='downloadify_'+Downloadify.uid++;return a.id}};Downloadify.create=function(a,b){var c=(typeof(a)=="string"?document.getElementById(a):a);return new Downloadify.Container(c,b)};Downloadify.Container=function(d,e){var f=this;f.el=d;f.enabled=true;f.dataCallback=null;f.filenameCallback=null;f.data=null;f.filename=null;var g=function(){f.options=e;if(!f.options.append)f.el.innerHTML="";f.flashContainer=document.createElement('span');f.el.appendChild(f.flashContainer);f.queue_name=Downloadify.getUID(f.flashContainer);if(typeof(f.options.filename)==="function")f.filenameCallback=f.options.filename;else if(f.options.filename)f.filename=f.options.filename;if(typeof(f.options.data)==="function")f.dataCallback=f.options.data;else if(f.options.data)f.data=f.options.data;var a={queue_name:f.queue_name,width:f.options.width,height:f.options.height};var b={allowScriptAccess:'always'};var c={id:f.flashContainer.id,name:f.flashContainer.id};if(f.options.enabled===false)f.enabled=false;if(f.options.transparent===true)b.wmode="transparent";if(f.options.downloadImage)a.downloadImage=f.options.downloadImage;swfobject.embedSWF(f.options.swf,f.flashContainer.id,f.options.width,f.options.height,"10",null,a,b,c);Downloadify.addToQueue(f)};f.enable=function(){var a=document.getElementById(f.flashContainer.id);a.setEnabled(true);f.enabled=true};f.disable=function(){var a=document.getElementById(f.flashContainer.id);a.setEnabled(false);f.enabled=false};f.getData=function(){if(!f.enabled)return"";if(f.dataCallback)return f.dataCallback();else if(f.data)return f.data;else return""};f.getFilename=function(){if(f.filenameCallback)return f.filenameCallback();else if(f.filename)return f.filename;else return""};f.getDataType=function(){if(f.options.dataType)return f.options.dataType;return"string"};f.complete=function(){if(typeof(f.options.onComplete)==="function")f.options.onComplete()};f.cancel=function(){if(typeof(f.options.onCancel)==="function")f.options.onCancel()};f.error=function(){if(typeof(f.options.onError)==="function")f.options.onError()};g()};Downloadify.defaultOptions={swf:'media/downloadify.swf',downloadImage:'images/download.png',width:100,height:30,transparent:true,append:false,dataType:"string"}})();if(typeof(jQuery)!="undefined"){(function($){$.fn.downloadify=function(b){return this.each(function(){b=$.extend({},Downloadify.defaultOptions,b);var a=Downloadify.create(this,b);$(this).data('Downloadify',a)})}})(jQuery)};if(typeof(MooTools)!='undefined'){Element.implement({downloadify:function(a){a=$merge(Downloadify.defaultOptions,a);return this.store('Downloadify',Downloadify.create(this,a))}})}; -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | jQuery Lifestream - Create a stream of your online activity. 9 | 10 | 33 | 34 | 35 | 36 | 37 | Fork me on GitHub 38 | 39 |
40 | 41 |
42 | 43 | 44 | 45 | 46 |
47 | 48 |

jQuery Lifestream 49 | by christianv

50 | 51 |
52 | Show a stream of your online activity 53 |

The easiest way to get started is to create your own lifestream.

54 |

Check out the example and the readme file.

55 |
56 | 57 |

Authors & Contact

58 |

Christian Vuerings (@denbuzze)

59 | 60 | 61 |

Download

62 |

63 | You can download this project in either 64 | zip or 65 | tar formats. 66 |

67 |

You can also clone the project with Git 68 | by running: 69 |

$ git clone git://github.com/christianvuerings/jquery-lifestream
70 |

71 | 72 | 75 | 76 |
77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/services/twitter.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | "use strict"; 3 | 4 | $.fn.lifestream.feeds.twitter = function(config, callback) { 5 | var template = $.extend({}, 6 | { 7 | "posted": '{{html tweet}}' 8 | }, 9 | config.template); 10 | 11 | /** 12 | * Add links to the twitter feed. 13 | * Hashes, @ and regular links are supported. 14 | * @private 15 | * @param {String} tweet A string of a tweet 16 | * @return {String} A linkified tweet 17 | */ 18 | var linkify = function( tweet ) { 19 | 20 | var link = function( t ) { 21 | return t.replace( 22 | /([a-z]+:\/\/)([-A-Z0-9+&@#\/%?=~_|(\)!:,.;]*[-A-Z0-9+&@#\/%=~_|(\)])/ig, 23 | function( m, m1, m2 ) { 24 | return $("").attr("href", m).text( 25 | ( ( m2.length > 35 ) ? m2.substr( 0, 34 ) + '...' : m2 ) 26 | )[0].outerHTML; 27 | } 28 | ); 29 | }, 30 | at = function( t ) { 31 | return t.replace( 32 | /(^|[^\w]+)\@([a-zA-Z0-9_]{1,15})/g, 33 | function( m, m1, m2 ) { 34 | var elem = ($("") 35 | .attr("href", "https://twitter.com/" + m2) 36 | .text("@" + m2))[0].outerHTML; 37 | return m1 + elem; 38 | } 39 | ); 40 | }, 41 | hash = function( t ) { 42 | return t.replace( 43 | /|(^|\r?\n|\r|\n|)(#|\$)([a-zA-Z0-9ÅåÄäÖöØøÆæÉéÈèÜüÊêÛûÎî_]+)(\r?\n|\r|\n||$)/g, 44 | function( m, m1, m2, m3, m4 ) { 45 | if (typeof m3 == "undefined") return m; 46 | var elem = ""; 47 | if (m2 == "#") { 48 | elem = ($("") 49 | .attr("href", 50 | "https://twitter.com/hashtag/" + m3 + "?src=hash") 51 | .text("#" + m3))[0].outerHTML; 52 | } else if (m2 == "$") { 53 | elem = ($("") 54 | .attr("href", 55 | "https://twitter.com/search?q=%24" + m3 + "&src=hash") 56 | .text("$" + m3))[0].outerHTML; 57 | } 58 | return (m1 + elem + m4); 59 | } 60 | ); 61 | }; 62 | 63 | return hash(at(link(tweet))); 64 | 65 | }, 66 | /** 67 | * Parse the input from twitter 68 | * @private 69 | * @param {Object[]} items 70 | * @return {Object[]} Array of Twitter status messages. 71 | */ 72 | parseTwitter = function(response) { 73 | var output = []; 74 | 75 | if (!response.tweets) { 76 | return output; 77 | } 78 | 79 | for(var i = 0; i < response.tweets.length; i++ ) { 80 | var status = response.tweets[i]; 81 | 82 | output.push({ 83 | "date": new Date(status.createdAt * 1000), // unix time 84 | "config": config, 85 | "html": $.tmpl( template.posted, { 86 | "tweet": linkify($('
').html(status.text).text()), 87 | "complete_url": 'https://twitter.com/' + config.user + 88 | "/status/" + status.id 89 | } ), 90 | "url": 'https://twitter.com/' + config.user 91 | }); 92 | } 93 | callback(output); 94 | }; 95 | 96 | $.ajax({ 97 | "url": 'https://twittery.herokuapp.com/' + config.user, 98 | "cache": false 99 | }).success(parseTwitter); 100 | 101 | // Expose the template. 102 | // We use this to check which templates are available 103 | return { 104 | "template" : template 105 | }; 106 | 107 | }; 108 | })(jQuery); 109 | -------------------------------------------------------------------------------- /download/js/jquery.notifications.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Notifications plugin 1.1 3 | * 4 | * http://programmingmind.com 5 | * 6 | * Copyright (c) 2009 David Ang 7 | * 8 | * 9 | * Dual licensed under the MIT and GPL licenses: 10 | * http://www.opensource.org/licenses/mit-license.php 11 | * http://www.gnu.org/licenses/gpl.html 12 | * 13 | * Version Changes 14 | * 15 | * 1.1 8/17/2008 16 | * - Allow users to choose between slide or fade effect 17 | * - Fixed fadeSpeed option settings 18 | * 19 | * 1.0 8/9/2008 20 | * - Initial release 21 | */ 22 | (function($){ 23 | var template; 24 | var counter = 0; 25 | 26 | $.notifications = function(msg, options) { 27 | counter++; 28 | 29 | var settings = $.extend({}, $.notifications.defaults, options); 30 | 31 | if (!template) { 32 | template = $('
').appendTo(document.body); 33 | } 34 | 35 | var n = $( '

' + msg + '

').hide().appendTo("#jquery-notifications"); 36 | if( settings.effect == "fade" ) { 37 | n.fadeIn( settings.fadeSpeed ); 38 | } else { 39 | n.slideDown( settings.fadeSpeed ); 40 | } 41 | 42 | if (settings.stick) { 43 | var close = $('' + settings.close + '').click(function() { 44 | if (settings.effect == "fade") { 45 | $(this.parentNode).fadeOut( settings.fadeSpeed, function() { 46 | $(this).remove(); 47 | }); 48 | } 49 | else { 50 | $(this.parentNode).slideUp( settings.fadeSpeed, function() { 51 | $(this).remove(); 52 | }); 53 | } 54 | }); 55 | close.appendTo(n); 56 | } 57 | 58 | if (!settings.stick) { 59 | var notificationsDelayer = delayTimer(settings.timeout); 60 | notificationsDelayer(update, { counter: counter, effect: settings.effect, fadeSpeed : settings.fadeSpeed } ); 61 | } 62 | 63 | if ($("#errorExplanation").length) { 64 | // if there exists an errorExplanation div from rails 3.0, 65 | // hide the errors and list them down as notifications 66 | $("#errorExplanation").hide(); 67 | $("#errorExplanation li").each(function(index) { 68 | $.n.error($(this).text()); 69 | }) 70 | } 71 | }; 72 | 73 | $.notifications.success = function( msg, options ){ 74 | return $.notifications( msg, $.extend( {}, options, { type : "success"}) ); 75 | }; 76 | 77 | $.notifications.error = function( msg, options ){ 78 | return $.notifications( msg, $.extend( { stick: true }, options, { type : "error" }) ); 79 | }; 80 | 81 | $.notifications.warning = function( msg, options ){ 82 | return $.notifications( msg, $.extend( {}, options, { type : "warning" }) ); 83 | }; 84 | 85 | function update(params) { 86 | if (params.effect == "fade") { 87 | $("#jquery-notifications-" + params.counter).fadeOut( params.fadeSpeed, function(){ 88 | $(this).remove(); 89 | }); 90 | } else { 91 | $("#jquery-notifications-" + params.counter).slideUp( params.fadeSpeed, function(){ 92 | $(this).remove(); 93 | }); 94 | } 95 | } 96 | 97 | function delayTimer(delay) { 98 | var timer; 99 | return function(fn, params) { 100 | timer = clearTimeout(timer); 101 | if (fn) 102 | timer = setTimeout(function() { 103 | fn(params); 104 | }, delay); 105 | return timer; 106 | }; 107 | } 108 | 109 | $.notifications.defaults = { 110 | type: "notice", 111 | timeout: 10000, 112 | stick: false, 113 | fadeSpeed : 800, 114 | close : "x", 115 | effect : "fade" 116 | }; 117 | 118 | $.n = $.notifications; 119 | 120 | })(jQuery); -------------------------------------------------------------------------------- /download/js/script.min.js: -------------------------------------------------------------------------------- 1 | function fetchServices(){$.n("Fetching available services..."),$.ajax({url:"services.json",dataType:"json"}).done(buildUI).fail(function(){$.n.error("Could not load service list. Please try reloading page.")})}function buildUI(e){$.n(e.length+" services available"),function(n,t,i,o,r){for(t=0,i=$("legend"),o=$('
').insertAfter(i);n>t;++t,i=o,o=$('
').insertAfter(i))for(r=t;r
")}(4),checkboxes=$('input[type="checkbox"]').extend({enable:function(){return this.each(function(){$(this).removeAttr("disabled")}),this},disable:function(){return this.each(function(){$(this).attr("disabled","disabled")}),this}}),buttons.build.disable().click(function(e){e.preventDefault(),build()}),$("form").delegate('form input[type="checkbox"]',"change",function(){var e=0;return function(){this.checked?e++:e--,"undefined"!=typeof uglify&&(e>0?buttons.build.enable():buttons.build.disable())}}()),Downloadify.create("button-bar",{filename:function(){return"jquery.lifestream.custom.min.js"},data:function(){return builtScript},onComplete:onDownloadComplete,onError:function(){alert("You must put something in the File Contents or there will be nothing to save!")},transparent:!1,swf:"js/downloadify.swf",downloadImage:"img/download.png",width:100,height:30,append:!0}),setTimeout(function(){buttons.download=$("#button-bar > object").extend({enable:function(){return this.css({visibility:"visible"}),this},disable:function(){return this.css({visibility:"hidden"}),this}}),buttons.download.disable()},0),$.n("Loading UglifyJS..."),$.getScript("js/uglifyjs-cs.min.js").fail(function(){$.n.error("Could not load UglifyJS. Please reload the page")}).done(function(){$.n("UglifyJS received")})}function build(){$.n("Build started"),checkboxes.disable(),buttons.build.disable(),buildScript($('input[type="checkbox"]').filter(":checked").map(function(){return $(this).attr("id")}).get(),onBuildCompleted,onBuildFailure)}function onBuildCompleted(e){$.n("Build completed"),builtScript=e,buttons.download.enable()}function onBuildFailure(){$.n.error("Build failed, please retry"),builtScript="",checkboxes.enable(),buttons.build.enable()}function onDownloadComplete(){checkboxes.enable(),buttons.download.disable(),buttons.build.enable()}function buildScript(e,n,t){function i(e,n,t){"abort"==n?$.n.error("Aborted "+this.url):$.n.error("Could not retrieve module "+this.url+": "+e.status)}var o=[],r=[];$.n("Fetching src modules..."),$.ajax({url:"../src/core.js",dataType:"text",cache:!1}).fail(function(e,n,o){i.apply(this,arguments),t()}).done(function(a){o.push(a),$.whenArray(r=$.map(e,function(e){return $.ajax({url:"../src/services/"+e+".js",dataType:"text",cache:!1}).done(function(e){o.push(e)}).fail(function(e,n,t){i.apply(this,arguments)})})).done(function(){$.n("All src moduled received"),$.n("Uglification..."),n(uglify(o.join(";")))}).fail(function(){var e,n;for(e=0;e 2 | 3 | 4 | 5 | 6 | 7 | 8 | jQuery Lifestream templates 9 | 10 | 30 | 31 | 32 | 33 | 34 | 35 | Fork me on GitHub 36 | 37 |

jQuery Lifestream Templates

38 |

Find more information about this plug-in on the project page.

39 |

Go ahead and create your own lifestream.

40 | 41 |

Current available templates:

42 |
43 | 44 | 45 | 46 | 47 | 48 | 81 | 82 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /me/jquery.ba-bbq.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery BBQ: Back Button & Query Library - v1.3pre - 8/26/2010 3 | * http://benalman.com/projects/jquery-bbq-plugin/ 4 | * 5 | * Copyright (c) 2010 "Cowboy" Ben Alman 6 | * Dual licensed under the MIT and GPL licenses. 7 | * http://benalman.com/about/license/ 8 | */ 9 | (function($,r){var h,n=Array.prototype.slice,t=decodeURIComponent,a=$.param,j,c,m,y,b=$.bbq=$.bbq||{},s,x,k,e=$.event.special,d="hashchange",B="querystring",F="fragment",z="elemUrlAttr",l="href",w="src",p=/^.*\?|#.*$/g,u,H,g,i,C,E={};function G(I){return typeof I==="string"}function D(J){var I=n.call(arguments,1);return function(){return J.apply(this,I.concat(n.call(arguments)))}}function o(I){return I.replace(H,"$2")}function q(I){return I.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(K,P,I,L,J){var R,O,N,Q,M;if(L!==h){N=I.match(K?H:/^([^#?]*)\??([^#]*)(#?.*)/);M=N[3]||"";if(J===2&&G(L)){O=L.replace(K?u:p,"")}else{Q=m(N[2]);L=G(L)?m[K?F:B](L):L;O=J===2?L:J===1?$.extend({},L,Q):$.extend({},Q,L);O=j(O);if(K){O=O.replace(g,t)}}R=N[1]+(K?C:O||!N[1]?"?":"")+O+M}else{R=P(I!==h?I:location.href)}return R}a[B]=D(f,0,q);a[F]=c=D(f,1,o);a.sorted=j=function(J,K){var I=[],L={};$.each(a(J,K).split("&"),function(P,M){var O=M.replace(/(?:%5B|=).*$/,""),N=L[O];if(!N){N=L[O]=[];I.push(O)}N.push(M)});return $.map(I.sort(),function(M){return L[M]}).join("&")};c.noEscape=function(J){J=J||"";var I=$.map(J.split(""),encodeURIComponent);g=new RegExp(I.join("|"),"g")};c.noEscape(",/");c.ajaxCrawlable=function(I){if(I!==h){if(I){u=/^.*(?:#!|#)/;H=/^([^#]*)(?:#!|#)?(.*)$/;C="#!"}else{u=/^.*#/;H=/^([^#]*)#?(.*)$/;C="#"}i=!!I}return i};c.ajaxCrawlable(0);$.deparam=m=function(L,I){var K={},J={"true":!0,"false":!1,"null":null};$.each(L.replace(/\+/g," ").split("&"),function(O,T){var N=T.split("="),S=t(N[0]),M,R=K,P=0,U=S.split("]["),Q=U.length-1;if(/\[/.test(U[0])&&/\]$/.test(U[Q])){U[Q]=U[Q].replace(/\]$/,"");U=U.shift().split("[").concat(U);Q=U.length-1}else{Q=0}if(N.length===2){M=t(N[1]);if(I){M=M&&!isNaN(M)?+M:M==="undefined"?h:J[M]!==h?J[M]:M}if(Q){for(;P<=Q;P++){S=U[P]===""?R.length:U[P];R=R[S]=P7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' 238 |

Uses the jQuery Lifestream Plug-in

239 |

Created by Christian Vuerings

240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 358 | 359 | 365 | 366 | 367 | 368 | --------------------------------------------------------------------------------