Skip to content

Instantly share code, notes, and snippets.

@dorianroy
Created April 25, 2010 18:20
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dorianroy/378594 to your computer and use it in GitHub Desktop.
Save dorianroy/378594 to your computer and use it in GitHub Desktop.
<link rel="stylesheet" href="http://static.ak.fbcdn.net/rsrc.php/zD5ZK/hash/4146lpfk.css" type="text/css" />
<script type="text/javascript">
var fbURL = PASTE_FACEBOOK_URL_HERE;
function insertLikeButton() {
var container = document.getElementById('flbCont');
var w = container.style.width;
var h = container.style.height;
fbFrame = document.createElement("IFRAME");
fbFrame.setAttribute("src", fbURL);
fbFrame.setAttribute("scrolling", "no");
fbFrame.setAttribute("frameBorder", 0);
fbFrame.setAttribute("allowTransparency", true);
fbFrame.style.border = "none";
fbFrame.style.overflow = "hidden";
fbFrame.style.width = w;
fbFrame.style.height = h;
container.replaceChild(fbFrame, document.getElementById('flb'));
}
</script>
<div id="flbCont" class="connect_widget">
<a id="flb" class="connect_widget_like_button clearfix like_button_no_like" onclick="insertLikeButton();" style="cursor:pointer;-moz-outline-style:none;text-decoration:none"><span class="liketext" style="line-height:1">Show Facebook Likes</span></a>
</div>
@dorianroy
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment