Created
January 25, 2013 17:55
-
-
Save johankj/4636481 to your computer and use it in GitHub Desktop.
A bookmarklet which adds a Facebook "Like"-button as well as a "Recommend"-button. Inspired by http://likeomatic.heroku.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
try { | |
var url = encodeURIComponent(location.href); | |
var ifr = document.createElement('iframe'); | |
ifr.style.position = 'absolute'; | |
ifr.style.top = 10 + 'px'; | |
ifr.style.left = 10 + 'px'; | |
ifr.style.width = 450 + 'px'; | |
ifr.style.height = 70 + 'px'; | |
ifr.style.border = 'none'; | |
ifr.src = 'http://www.facebook.com/plugins/like.php?href=' + url + '&show_faces=true&width=450&action=like&colorscheme=light'; | |
ifr.scrolling = 'no'; | |
ifr.frameborder = 0; | |
document.getElementsByTagName('body')[0].appendChild(ifr); | |
var ifr = document.createElement('iframe'); | |
ifr.style.position = 'absolute'; | |
ifr.style.top = 80 + 'px'; | |
ifr.style.left = 10 + 'px'; | |
ifr.style.width = 450 + 'px'; | |
ifr.style.height = 70 + 'px'; | |
ifr.style.border = 'none'; | |
ifr.src = 'http://www.facebook.com/plugins/like.php?href=' + url + '&show_faces=true&width=450&action=recommend&colorscheme=light'; | |
ifr.scrolling = 'no'; | |
ifr.frameborder = 0; | |
document.getElementsByTagName('body')[0].appendChild(ifr); | |
} catch (e) {} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){try{var url=encodeURIComponent(location.href);var ifr=document.createElement("iframe");ifr.style.position="absolute";ifr.style.top=10+"px";ifr.style.left=10+"px";ifr.style.width=450+"px";ifr.style.height=70+"px";ifr.style.border="none";ifr.src="http://www.facebook.com/plugins/like.php?href="+url+"&show_faces=true&width=450&action=like&colorscheme=light";ifr.scrolling="no";ifr.frameborder=0;document.getElementsByTagName("body")[0].appendChild(ifr);var ifr=document.createElement("iframe");ifr.style.position="absolute";ifr.style.top=80+"px";ifr.style.left=10+"px";ifr.style.width=450+"px";ifr.style.height=70+"px";ifr.style.border="none";ifr.src="http://www.facebook.com/plugins/like.php?href="+url+"&show_faces=true&width=450&action=recommend&colorscheme=light";ifr.scrolling="no";ifr.frameborder=0;document.getElementsByTagName("body")[0].appendChild(ifr)}catch(e){}})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment