' + showTime + '' + element.User.Name + ' - @' + element.User.ScreenName + '
' + replaceURLWithHTMLLinks(element.Text).parseSymbols() + '
'; }); $('#twitter-feed').html(twitterFeed); /* Get Sponsored Scuttles now */ getSponsoredScuttles('#twitter-feed', 'Scuttle List Tweets'); }); }, getScuttlesInTrending100: function (limit, tickers) { var allScuttles = '', scuttlesUrl = '/service/scuttles.ashx?job=trending100&limit=' + limit + '&tickers=' + tickers; $.ajax({ url: scuttlesUrl, dataType: 'json', success: function (data) { $.each(data, function (index, element) { allScuttles += buildScuttles(element, false, true); }); $('#scuttles').html(allScuttles); /* Get Sponsored Scuttles now */ getSponsoredScuttles('#scuttles', 'Scuttle List'); } }); }, getNewsFeed: function (yahooTicker, limit) { var feedUrl = 'https://feeds.finance.yahoo.com/rss/2.0/headline?s=' + yahooTicker + '®ion=US&lang=en-US'; $.ajax({ url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=' + limit + '&callback=?&q=' + encodeURIComponent(feedUrl), dataType: 'json', success: function (data) { $('#latest-news').html(''); $.each(data.responseData.feed.entries, function (index, element) { var companyNews = '', datePost = new Date(element.publishedDate); companyNews += '' + element.title + '
'; companyNews += '' + datePost.toDateString() + ''; companyNews += 'read full article »
'; companyNews += '
'; $('#latest-news').append(companyNews); }); } }); } }; scuttlebutt.init = function () { scuttlebutt.feeds.init(); var tickers = 'AAPL,OHRP,SUNE,FB,NFLX,TWTR,TSLA,DIS,CMG,GPRO,AMZN,EXAS,BBRY,FIT,UA,SEDG,SNGX,LON:OXIG,AMBA,QRVO'; scuttlebutt.feeds.getNewsFeed(tickers, 50); scuttlebutt.feeds.buildTrending100Stocks('AAPL,OHRP,SUNE,FB,NFLX,TWTR,TSLA,DIS,CMG,GPRO,AMZN,EXAS,BBRY,FIT,UA,SEDG,SNGX,LON:OXIG,AMBA,QRVO'); if (localStorage.uid) { getMessageCount(); } }; /* CALL scuttlebutt INIT */ $(function () { checkSession(); scuttlebutt.init(); $("#btnStreamingOn").click(function () { $('#btnStreamingOn').removeClass('active').addClass('active'); $('#btnStreamingOff').removeClass('active'); }); $("#btnStreamingOff").click(function () { $('#btnStreamingOff').removeClass('active').addClass('active'); $('#btnStreamingOn').removeClass('active'); }); /* Refreshes page every 2 min */ window.setInterval(function () { if ($('#btnStreamingOn').hasClass('active')) { scuttlebutt.feeds.init(); } }, 120000); }); (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m); })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'UA-41112749-1', 'scutify.com'); ga('send', 'pageview');