1jQuery(document).ready(function($){ 2 var count = 0, 3 list = [], 4 services = {}; 5 6 jQuery.each( users, function(svc,valueObj ){ 7 if( valueObj!='' && svc != 'num_feeds' && svc != 'google_api_svc'){ 8 if( svc == 'googleplus' ) { 9 services = { 10 service: svc, 11 user: valueObj, 12 key: users.google_api_key 13 } 14 } 15 else if( svc == 'deviantart' ) { 16 services = { 17 service: svc, 18 user: valueObj, 19 template: { 20 deviationpost: '<a href="http://'+valueObj+'.deviantart.com/">'+valueObj+'</a> uploaded a deviation: <a href="${url}">${title}</a>' 21 } 22 } 23 } 24 else { 25 services = { 26 service: svc, 27 user: valueObj, 28 } 29 } 30 list.push( services ); 31 } 32 }); 33 34console.log(list); 35 Date.prototype.toISO8601 = function(date) { 36 var pad = function (amount, width) { 37 var padding = ""; 38 while (padding.length < width - 1 && amount < Math.pow(10, width - padding.length - 1)) 39 padding += "0"; 40 return padding + amount.toString(); 41 } 42 date = date ? date : new Date(); 43 var offset = date.getTimezoneOffset(); 44 return pad(date.getFullYear(), 4) 45 + "-" + pad(date.getMonth() + 1, 2) 46 + "-" + pad(date.getDate(), 2) 47 + "T" + pad(date.getHours(), 2) 48 + ":" + pad(date.getMinutes(), 2) 49 + ":" + pad(date.getUTCSeconds(), 2) 50 + (offset > 0 ? "-" : "+") 51 + pad(Math.floor(Math.abs(offset) / 60), 2) 52 + ":" + pad(Math.abs(offset) % 60, 2); 53 }; 54 55 jQuery("#lifestream").lifestream({ 56 limit: parseInt(users.num_feeds), 57 list: list, 58 feedloaded: function(){ 59 count++; 60 // Check if all the feeds have been loaded 61 if( count === list.length - 1 ){ 62 jQuery("#lifestream li").each(function(){ 63 var element = $(this), 64 date = new Date(element.data("time")); 65 element.append('<span class="timeago" title="' + date.toISO8601(date) + '">' + date + "</span>"); 66 }) 67 jQuery("#lifestream .timeago").timeago(); 68 } 69 } 70 }); 71});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.