‘);
handlers.failure();
}
else{
removeLfError();
handlers.success();
}
};
function updateAuthorLinks(){
$(‘.fyre-comment-username’).each(function() {
$(this).click(function() {
window.location.href = $(this).attr(‘href’);
});
});
$(‘.fyre-comment-author’).each(function() {
$(this).click(function() {
window.location.href = $(this).attr(‘href’);
});
});
}
function updateOneLineComments(){
//console.log(“Checking Comments”);
$(“.fyre-comment-wrapper”).each(function() {
if ($(this).find(“.fyre-comment”).css(‘display’) != ‘none’){
var commentText = $(this).find(“.fyre-comment”).html();
if (commentText != null){
var loopCtr = 0;
// for IE8
while ( (commentText.indexOf(“
“) !== -1) && (loopCtr “,’ ‘);
commentText = commentText.replace(“
“,’ ‘);
loopCtr++;
}
//for other browsers
while ( (commentText.indexOf(“
“) !== -1) && (loopCtr “,’ ‘);
commentText = commentText.replace(“
“,’ ‘);
loopCtr++;
}
//console.log(commentText);
$(this).find(“.fyre-comment”).css(‘display’,’none’);
$(this).find(“.fyre-comment-head”).append(commentText);
} // end check for blank text
}
//console.log(“Checking Height”);
cntHeight = $(this).find(“.fyre-comment-head”).height();
if (cntHeight > 0){
//console.log(“Setting Height”);
cntHeight = -1 * ((cntHeight / 2) + 12);
$(this).find(“.fyre-flag-link”).css(‘top’,cntHeight);
}
});
}
function change_profile_link(){
$(“.fyre .fyre-box-list .fyre-edit-profile-link a”).attr(“href”,’#’);
$(“.fyre .fyre-box-list .fyre-edit-profile-link a”).attr(“alt”,”);
$(‘.fyre .fyre-box-list .fyre-edit-profile-link a’).click(function() { return false; });
$(‘.fyre .fyre-box-list .fyre-edit-profile-link’).remove();
$(“.fyre .fyre-comment-head .fyre-comment-username”).attr(“href”,’#’);
$(“.fyre .fyre-comment-head .fyre-comment-username”).attr(“target”,”);
$(“.fyre .fyre-comment-head .fyre-comment-username”).attr(“alt”,”);
$(‘.fyre .fyre-comment-head .fyre-comment-username’).click(function() { return false; });
$(‘.fyre .fyre-comment-head’).each(function() {
var alltxt = $(this).html();
var nickname = $(this).find(‘.fyre-comment-username’).html();
if (!(nickname == null)){
alltxt = “” + nickname + ‘
‘ + alltxt.replace(/]*)>[\s\S]*?/gi,”);
$(this).html(alltxt);
}
});
$(‘.fyre .fyre-comment p’).each(function() {
var alltxt = $(this).html();
var mention = $(this).find(‘.fyre-mention’).html();
if (!(mention == null)){
alltxt = alltxt.replace(/]*)>[\s\S]*?/gi,”);
$(this).html(alltxt);
}
});
}
function open_profile(profile_link_url){
window.open(profile_link_url);
}
$(document).ready( function () {
// Log in the user if we got a token for them
// Change the DOM after login since things get re-rendered
//console.log(“== LF Calling Load ==”);
var conv = fyre.conv.load({“network”: “cbssports.fyre.co”, ‘strings’: customStrings, authDelegate: authDelegate}, lf_config, function(widget) {
//console.log(“== LF in Load ==”);
widget.on(‘initialRenderComplete’, function () {
//console.log(“== LF Render Complete ==”);
$(‘#lf_comments_label’).show();
loggedin = readCookie(‘ pid’);
//CBSi.log(loggedin);
if ((typeof loggedin == “string”) && (loggedin.match(/^L:/))) {
isLoggedIn = 1;
if (typeof userObj.token != ‘undefined’){
if (userObj.token) {
hasProfile = 1;
document.cookie = “lf_social_info=; expires=0; path=/”;
doLivefyreAuth(userObj);
}
}
changeDOM();
}
var loggedSocially = new String(readCookie(‘lf_social_info’));
if ((loggedSocially == “|FB|”) && (isLoggedIn == 0)){
isLoggedIn = 1;
hasProfile = 1;
callFBApi();
}
if ((loggedSocially.indexOf(“|GP|”) >= 0) && (isLoggedIn == 0)){
isLoggedIn = 1;
hasProfile = 1;
callGPApi();
}
updateCommentCounts(‘.commentsBubble’,$(‘.fyre-stream-stats .fyre-comment-count span’).html());
updateAuthorLinks();
setTimeout(function(){},2000);
change_profile_link();
setTimeout(function(){change_profile_link()},2000);
});
widget.on(‘userLoggedIn’, function () {
//CBSi.log(“== LF Logging In User ==”);
changeDOM();
removeLfError();
//console.log(“Logged in changing comment format”);
setTimeout(function(){change_profile_link()},2000);
});
widget.on(‘userLoggedOut’, function () {
//CBSi.log(“== LF Logging Out User ==”);
if (document.cookie.indexOf(“|GP|”) > 0){
disconnectGPUser(globalGPaccessToken);
}
document.cookie = “lf_social_info=; expires=0; path=/”
document.cookie = “lf_login_info=; expires=0; path=/”
setTimeout(function(){FB.XFBML.parse();},500);
});
widget.on(‘commentCountUpdated’, function (countData) {
//CBSi.log(“== LF Comment Added ==”);
updateCommentCounts(‘.commentsBubble’,countData);
change_profile_link();
setTimeout(function(){change_profile_link()},2000);
});
widget.on(‘commentPosted’, function (countData) {
updateAuthorLinks();
change_profile_link();
setTimeout(function(){change_profile_link()},2000);
});
});
});
\n \n \n \n\n
\n \n\n \n”,”synopsis”:”Another week, another injury that affects Fantasy teams. This time it’s ben Roethlisberger’s knee. What’s next? Our Jamey Eisenberg takes stock in his recap.”,”photo”:{},”href”:{},”title”:{}},”headlines”:[{“paid”:null,”href”:null,”content”:null}]},”worldcup”:{“minicover”:{“body”:”
John Brooks’ header to send the US past Ghana. Brazil’s epic collapse. Mario Gotze’s clinching goal in the final. We hand out awards for the best moments in Brazil. Story “,”synopsis”:”World Cup in review”,”photo”:{“width”:”231″,”seq_no”:”1″,”content_id”:”24620624″,”href”:”$IMAGE_SERVER/u/photos/soccer/img24620624.jpg”,”height”:”130″},”href”:”http://www.cbssports.com/world-cup/eye-on-world-cup/24620523/cbssportscom-2014-fifa-world-cup-awards-best-moments”,”title”:”World Cup’s best moments”},”headlines”:[{“paid”:”false”,”href”:”http://www.cbssports.com/world-cup/eye-on-world-cup/24622027/world-cup-final-sets-usa-television-record-with-265-million-viewers”,”content”:”Cup final sets ratings mark for soccer on US TV”},{“paid”:”false”,”href”:”http://www.cbssports.com/world-cup/eye-on-world-cup/24621936/watch-massive-crowd-celebrates-germanys-world-cup-victory”,”content”:”Massive crowd toasts German team in Berlin”},{“paid”:”false”,”href”:”http://www.cbssports.com/world-cup/eye-on-world-cup/24620830/maradona-claims-messis-golden-ball-award-just-a-marketing-plan”,”content”:”Maradona: Messi undeserving of Golden Ball”},{“paid”:”false”,”href”:”http://www.cbssports.com/world-cup/eye-on-world-cup/24620634/world-cup-2018-odds-germany-early-favorite-to-repeat-us-50-to-1″,”content”:”Germany early favorite for the 2018 World Cup”},{“paid”:”false”,”href”:”http://www.cbssports.com/world-cup/eye-on-world-cup/24620345/brazil-coach-luiz-felipe-scolari-out-after-disastrous-end-to-world-cup”,”content”:”Brazil boots manager after ugly World Cup finish”},{“paid”:”false”,”href”:”http://www.cbssports.com/world-cup/eye-on-world-cup/24619193/report-suarez-will-lose-millions-from-barcelona-if-he-bites-anyone”,”content”:”Suarez will lose millions from Barca if he bites”},{“paid”:”false”,”href”:”http://www.cbssports.com/world-cup/eye-on-world-cup/24615958/fifa-world-cup-final-germany-vs-argentina-preview”,”content”:”Germany edges Argentina to win ’14 World Cup”}]}};
if (globalNav && navContentJson) {globalNav.init(navContentJson);}
CBSi.globalNav = globalNav;
});