Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.             // Load snippet from RDN user timeline
  3.             function gsparse(userTimeline) {
  4.                 var timeline = '';
  5.                 try {
  6.                     timeline = '<a href="//rainbowdash.net/user/798">'
  7.                         + userTimeline[0].user.statuses_count
  8.                         + ' dashes</a>';
  9.                     for(var i = 0; i < 5; i++) {
  10.                         timeline += '<div class="gs-post"><p>'
  11.                             + userTimeline[i].statusnet_html
  12.                             + '</p><a href="//rainbowdash.net/notice/'
  13.                             + userTimeline[i].id
  14.                             + '">'
  15.                             + userTimeline[i].created_at.replace(/\S+ (\S+ \S+) (\d+:\d+):\d+ \S+ (\S+)/gi, '$1 $3 ($2)')
  16.                             + '</a></div>';
  17.                     }
  18.                 } catch(e) {timeline = '<a href="//rainbowdash.net/user/798">Error.</a>';}
  19.                 document.write(timeline);
  20.             }
  21.             function loadGNUSoc() {
  22.                 document.write('<script type="text/javascript" src="//rainbowdash.net/api/statuses/user_timeline/798.json?count=5&amp;callback=gsparse"><' + '/script>');
  23.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement