JQuery
(function (a, e, h, b, d) { | |
b = e.createElement(h); | |
b.src = "//www.googleadservices.com/pagead/conversion.js"; b.async=1; | |
d = e.getElementsByTagName(h)[0]; | |
d.parentNode.insertBefore(b, d); | |
})(window, document, "script"); |
function initFbEmbedPosts(){ | |
jQuery('.embed-fb-comments').each(function(i,e){ | |
var comment = jQuery(e); | |
var postId = comment.attr('data-post-id'); | |
//you will need the div with attribute data-post-id | |
//You can also make this get the ID from the fb embed post element | |
jQuery.getJSON('https://graph.facebook.com/'+ postId +'/comments', null, function(data){ | |
for (obj in data.data) { | |
var item = data.data[obj]; | |
var itemRow = wddFbMakeCommentRow(item); | |
comment.append( itemRow ); | |
} | |
}); | |
}); | |
}; | |
function wddFbMakeCommentRow(object){ | |
var row = '<div class="UFIRow clearfix">'+ "\n" + | |
'<div class="ufithumbwrap">'+ "\n" + | |
' <a href="http://facebook.com/profile.php?id='+ object.from.id +'" class="ufithumblnk">'+ "\n" + | |
' <img class="ufithumb" src="http://graph.facebook.com/'+ object.from.id +'/picture?type=square" />'+ "\n" + | |
' </a>'+ "\n" + | |
'</div>'+ "\n" + | |
'<div>'+ "\n" + | |
' <div class="clearfix UFIImageBlockContent ">'+ "\n" + | |
' <div class="UFICommentContentBlock">'+ "\n" + | |
' <div class="UFICommentContent">'+ "\n" + | |
' <a href="http://facebook.com/profile.php?id='+ object.from.id +'" class="UFICommentActorName">'+ "\n" + | |
object.from.name + "\n" + | |
' </a>'+ "\n" + | |
' <span class="UFICommentBody">'+ "\n" + | |
object.message + "\n" | |
' </span>'+ "\n" + | |
' </div>'+ "\n" + | |
' </div>'+ "\n" + | |
' </div>'+ "\n" + | |
'</div>'+ "\n" + | |
'<div class="clearfix"></div>'+ "\n" + | |
'</div>'; | |
return row; | |
} |
var inputs = document.querySelectorAll('a._42ft._4jy0._4jy3._517h'); | |
for(var i=1; i<inputs.length;i++) { | |
var str =inputs[i].text, str2 ='Invite'; | |
if(str.indexOf(str2) >= 0){inputs[i].click(); console.log('|');} } |
var wrap = $(".navbar"); | |
$(document).scroll(function(e) { | |
if ($(this).scrollTop() > 247) | |
wrap.addClass("fixed"); | |
else | |
wrap.removeClass("fixed"); | |
}); |
setInterval(function() { | |
$("#refresh").load(location.href+" #refresh>*",""); | |
}, 10000); // milliseconds to wait |
var maxheight = 0; | |
$("div.col").each(function(){ | |
if($(this).height() > maxheight) { maxheight = $(this).height(); } | |
}); | |
$("div.col").height(maxheight); |
if(location.hash){ | |
var e = document.getElementById(location.hash.substr(1)); | |
e.scrollIntoView(); | |
} |
$('.js-stream-item').each(function(i,v) { | |
var str = $(this).find('.FollowStatus'); | |
if(!str.length){ | |
$(this).find('.user-actions-follow-button').click(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment