diff --git a/index.html b/index.html index 06cb69c2..eafd2c3e 100644 --- a/index.html +++ b/index.html @@ -77,9 +77,13 @@ + + link="http://ncase.me/trust/" + facebook="Share on Facebook" + twitter="Tweet" + email="Send email">
diff --git a/js/lib/sharing.js b/js/lib/sharing.js index 7b8b8301..a4b783b8 100644 --- a/js/lib/sharing.js +++ b/js/lib/sharing.js @@ -10,14 +10,18 @@ window.addEventListener("load",function(){ text = encodeURIComponent(text); link = encodeURIComponent(link); + var facebook = sharingDOM.getAttribute("facebook"); + var twitter = sharingDOM.getAttribute("twitter"); + var email = sharingDOM.getAttribute("email"); + // Create full html var sharing = document.createElement("div"); sharing.className = "sharing"; - sharing.innerHTML = 'Share on Facebook'+ - 'Tweet'+ - 'Send email'; + sharing.innerHTML = ''+facebook+''+ + ''+twitter+''+ + ''+email+''; // Replace it in the dom sharingDOM.parentNode.replaceChild(sharing, sharingDOM); -}); \ No newline at end of file +});