Skip to content

Instantly share code, notes, and snippets.

@davidlwatsonjr
Created August 5, 2015 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidlwatsonjr/4bc18308cee5317d2add to your computer and use it in GitHub Desktop.
Save davidlwatsonjr/4bc18308cee5317d2add to your computer and use it in GitHub Desktop.
javascript: (function() {
var url = encodeURIComponent(location.href);
var w = 47;
var h = 86;
var ifr = document.createElement('iframe');
ifr.style.position = 'fixed';
ifr.style.top = '10px';
ifr.style.left = '10px';
ifr.style.width = w + 'px';
ifr.style.height = h + 'px';
ifr.style.border = 'none';
ifr.style.zIndex = 2147483647;
ifr.src = '//www.facebook.com/plugins/like.php?href=' + url + '&show_faces=false&width=' + w + '&height=' + h + '&layout=box_count&action=like&share=true';
ifr.scrolling = 'no';
ifr.frameborder = 0;
document.getElementsByTagName('body')[0].appendChild(ifr);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment