Skip to content

Instantly share code, notes, and snippets.

@koesbong
Created May 10, 2011 00:15
Show Gist options
  • Select an option

  • Save koesbong/963690 to your computer and use it in GitHub Desktop.

Select an option

Save koesbong/963690 to your computer and use it in GitHub Desktop.
if(document.getElementById('kt_fbLikeButton')) {
var fbLikeButton_opts = {},
fbLikeButton_layout =document.getElementById('kt_fbLikeButton').getAttribute('kt_fbLikeButton:layout'),
fbLikeButton_showface =document.getElementById('kt_fbLikeButton').getAttribute('kt_fbLikeButton:show_face');
fbLikeButton_width =document.getElementById('kt_fbLikeButton').getAttribute('kt_fbLikeButton:width');
if(fbLikeButton_layout) {
fbLikeButton_opts.layout = fbLikeButton_layout;
}
if(fbLikeButton_showface) {
fbLikeButton_opts.show_face = fbLikeButton_show_face;
}
if(fbLikeButton_width) {
fbLikeButton_opts.width = fbLikeButton_width;
}
this.fbLikeButton(fbLikeButton_opts);
}
if(document.getElementById('kt_twitterShareButton')) {
var twitterShareButton_opts = {},
twitterShareButton_text = document.getElementById('kt_twitterShareButton').getAttribute('kt_twitterShareButton:text'),
twitterShareButton_url = document.getElementById('kt_twitterShareButton').getAttribute('kt_twitterShareButton:url');
if(twitterShareButton_text) {
twitterShareButton_opts.text = twitterShareButton_text;
}
if(twitterShareButton_url) {
twitterShareButton_opts.url = twitterShareButton_url;
}
this.twitterShareButton(twitterShareButton_opts);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment