Skeptics question Deal’s trumpeting of niche magazine’s business rankings

00==this.innerEl.scrollTop||r 0 typeof item.childContent[0].content.oembed !== ‘undefined’ typeof item.childContent[0].content.oembed.url !== ‘undefined’) {$NEWLINEttttttttttvar oembed = item.childContent[0].content.oembed;$NEWLINEtttttttttt// ensure that the url attribute exists and contains a jpg url$NEWLINEtttttttttt// then append the image to the bodyHtml value (used instead of oembed.title, as .title is truncated)$NEWLINEttttttttttif (oembed.url.indexOf(‘.jpg’) -1) {$NEWLINEttttttttttthtml = item.content.bodyHtml + ”;$NEWLINEtttttttttt}$NEWLINEttttttttt}$NEWLINEtttttttttelse if (typeof item.content.feedEntry !== ‘undefined’ item.content.feedEntry.description !== ‘undefined’ item.content.feedEntry.description !== ”) {$NEWLINEtttttttttthtml = item.content.feedEntry.description;$NEWLINEttttttttt}$NEWLINEtttttttttelse {$NEWLINEtttttttttthtml = item.content.bodyHtml;$NEWLINEttttttttt}$NEWLINEttttttttthtml = html.replace(/style=”.+?”/g, ”);$NEWLINEtttttttt$NEWLINEtttttttttif ($.inArray(item.content.id, config_obj.content_event_ids) === -1) {$NEWLINEttttttttttconfig_obj.collections_content.push([html, collection_data.headDocument.authors[item.content.authorId], item.content.updatedAt, collection_url, collection_title, item.content.id]);$NEWLINEttttttttttif (config_obj.initial) {$NEWLINEttttttttttt// initial widget load$NEWLINEtttttttttttif (config_obj.collection_index + 1 == config_obj.collections_to_display || config_obj.current_item_index + 1 == config_obj.max_items_to_display) {$NEWLINEtttttttttttt// re-sort the array to be reverse-chronological$NEWLINEtttttttttttt// and then build the display$NEWLINEttttttttttttconfig_obj.collections_content.sort(function(a, b) { $NEWLINEtttttttttttttreturn parseInt(a[2]) – parseInt(b[2]); $NEWLINEtttttttttttt});$NEWLINEtttttttttt$NEWLINEtttttttttttt$.when($(config_obj.collections_content).each(function(i) {$NEWLINEtttttttttttttif (i = collection_data.headDocument.content.length – 1) {$NEWLINEttttttt// this collection has no content that can be displayed$NEWLINEttttttt// so reduce the # of total collections by 1$NEWLINEtttttttconfig_obj.collections_to_display -= 1;$NEWLINEtttttttreturn false;$NEWLINEtttttt}$NEWLINEttttt});$NEWLINEttttt$(‘.cmgLcContainer’).show();$NEWLINEtttt}$NEWLINEttt}$NEWLINEtt});$NEWLINEt}$NEWLINEt$NEWLINEt// disable scrolling of the overall page, while scrolling the widget$NEWLINEtfunction DisablePageScroll() {$NEWLINEtt$(‘.antiscroll-wrap’).mouseenter(function(e) {$NEWLINEttt$(‘body’).addClass(‘disable-scroll’);$NEWLINEtt}).mouseleave(function(e) {$NEWLINEttt$(‘body’).removeClass(‘disable-scroll’);$NEWLINEtt});$NEWLINEttconfig.page_scroll_disabled = true;$NEWLINEt}$NEWLINEt$NEWLINEt// function for determining “time ago” display$NEWLINEtfunction FormatDate(unix_timestamp) {$NEWLINEttvar difference_in_seconds = (Math.round((new Date()).getTime() / 1000)) – unix_timestamp,$NEWLINEttcurrent_date = new Date(unix_timestamp * 1000), minutes, hours,$NEWLINEttmonths = new Array($NEWLINEttt’January’,’February’,’March’,’April’,’May’,$NEWLINEttt’June’,’July’,’August’,’September’,’October’,$NEWLINEttt’November’,’December’);$NEWLINEt$NEWLINEttif (difference_in_seconds 60*60*24){$NEWLINEtttif (current_date.getYear() !== new Date().getYear()) {$NEWLINEttttreturn current_date.getDate() + ” ” + months[current_date.getMonth()].substr(0,3) + ” ” + _fourdigits(current_date.getYear());$NEWLINEttt}$NEWLINEtttreturn current_date.getDate() + ” ” + months[current_date.getMonth()].substr(0,3);$NEWLINEtt}$NEWLINEt$NEWLINEttreturn difference_in_seconds;$NEWLINEt$NEWLINEttfunction _fourdigits(number)t{$NEWLINEtttreturn (number 0) {$NEWLINEtttttt$.when($, $NEWLINEttttttt$(response.data).each(function() {$NEWLINEttttttttif (config_obj.collection_index -1) ? ” : ‘?’) + ‘icmp=’ + chatter_site_abbrev + ‘_internallink_latest_chatterwidget_socialhubs’;$NEWLINEttt$container.removeClass(‘cmgLcPrototype’);$NEWLINEttt$container.find(‘.cmgLcTopicContent’).remove();$NEWLINEttt$(‘.cmgLcBody’).prepend($container);$NEWLINEttt$content = $(‘.cmgLcPrototype .cmgLcTopicContent’).clone();$NEWLINEtttif (remove_border) {$NEWLINEtttt$content.css({$NEWLINEtttttborder:’none’$NEWLINEtttt});$NEWLINEttt}$NEWLINEtttif (typeof $author.profileUrl !== ‘undefined’ $author.profileUrl !== ”) {$NEWLINEtttt$content.find(‘.cmgLcAuthorName’).html($(‘‘, {$NEWLINEttttt// if the author is ‘www.ajc.com’ link to the collection url, $NEWLINEttttt// otherwise link to the author’s profile url$NEWLINEttttt’href’: ($author.displayName == ‘www.ajc.com’ ? collection_url : $author.profileUrl),$NEWLINEttttt’html’: $author.displayName$NEWLINEtttt}));$NEWLINEttt} else {$NEWLINEtttt$content.find(‘.cmgLcAuthorName’).text($author.displayName);$NEWLINEttt}$NEWLINEttt$content.find(‘.cmgLcTopicTimestamp’).text(FormatDate(timestamp));$NEWLINEtttif (html != ” html != ‘

‘) {$NEWLINEttttif (html.indexOf(‘/g);$NEWLINEttttt$content.find(‘.cmgLcTopicImage’).css({‘margin’: ‘-15px 0 15px’}).html(img[0]);$NEWLINEttttthtml = html.replace(img[0], ”);$NEWLINEtttt}$NEWLINEtttt$content.find(‘.cmgLcTopicTitle’).html($(‘‘, {$NEWLINEttttt’href’: collection_url,$NEWLINEttttt’html’: collection_title$NEWLINEtttt}));$NEWLINEtttt// replace with a space, remove all other tags (but and ) completely, and replace multiple spaces with a single$NEWLINEtttthtml = html.replace(/

/g, ”).replace(//g, ‘ ‘).replace(//g, ”).replace(//g, ”).replace(/ {2,}/g, ‘ ‘);$NEWLINEttttif ($(‘.cmgLcBody’).html().indexOf(html) -1) {$NEWLINEttttt// this content has already been displayed (e.g. as part of another collection)$NEWLINEtttttreturn false;$NEWLINEtttt} else {$NEWLINEttttt$content.find(‘.cmgLcTopicText’).html(html);$NEWLINEtttt}$NEWLINEtttttext_words = html.replace(//g, ”).replace(//g, ”).split(‘ ‘);$NEWLINEttttif (text_words.length config.truncate_word_count) {$NEWLINEttttt// the content is longer than the word count limit$NEWLINEttttt// so we will cut it off at the limit)$NEWLINEttttttext_words = text_words.slice(config.truncate_word_count);$NEWLINEtttttvar text_to_replace = text_words.join(‘ ‘);$NEWLINEtttttif (html.indexOf(text_to_replace) == -1) {$NEWLINEtttttt// the exact string to be replaced isn’t matched, likely due to html$NEWLINEttttttvar snippet = html.substr(0, html.indexOf(text_words[0] + ‘ ‘ + text_words[1]));$NEWLINEttttttif (snippet.lastIndexOf(”) -1) {$NEWLINEttttt// measured in seconds; round up or down update to minutes$NEWLINEtttttvar time = timestamp.substr(0, timestamp.indexOf(‘s’)) * 1;$NEWLINEttttttime = time = 30 ? 2 : 1;$NEWLINEttttt$(this).text(time + ‘m’);$NEWLINEtttt} else if (timestamp.indexOf(‘m’) -1) {$NEWLINEttttt// measured in minutes; increment$NEWLINEtttttvar time = timestamp.substr(0, timestamp.indexOf(‘m’)) * 1;$NEWLINEtttttif (time = 60) {$NEWLINEtttttt$(this).text(‘1h’);$NEWLINEttttt} else {$NEWLINEtttttttime++;$NEWLINEtttttt$(this).text(time + ‘m’);$NEWLINEttttt}$NEWLINEtttt}$NEWLINEttt});$NEWLINEttt// update timestamps every minute$NEWLINEtttsetTimeout(‘cmg.latest_chatter.UpdateTimestamps()’, 60000);$NEWLINEtt}$NEWLINEt}$NEWLINE})(jQuery);$NEWLINE$NEWLINEjQuery(document).ready(function() {$NEWLINEt// initialize chatter setup of polling$NEWLINEtcmg.latest_chatter.Init();$NEWLINEt// update timestamps every minute$NEWLINEtsetTimeout(‘cmg.latest_chatter.UpdateTimestamps()’, 60000);$NEWLINE});$NEWLINE/*** end chatter js ***/$NEWLINE}$NEWLINE$ENDSCRIPT$NEWLINE