|
| 1 | +<div id="fb-root"></div> |
| 2 | + |
| 3 | +<ul class="post-share ulno mob"> |
| 4 | + |
| 5 | +<!-- Hacker News --> |
| 6 | +<li class="hn"><span id="hnews"></span> |
| 7 | + |
| 8 | +<!-- Twitter --> |
| 9 | +<li class="tw"><a href="https://twitter.com/share" class="twitter-share-button" data-text="{{ page.title }}" data-via="{{ site.JB.sharing.twitter.via }}" data-related="{{ site.author.twitter }}" data-count="{{ site.JB.sharing.twitter.count }}" data-size="{{ site.JB.sharing.twitter.size }}">Tweet</a> |
| 10 | + |
| 11 | +<!-- Google+ --> |
| 12 | +<li class="gp"><div class="g-plusone" data-size="{{ site.JB.sharing.googleplus.size }}" data-annotation="{{ site.JB.sharing.googleplus.annotation }}" data-width="{{ site.JB.sharing.googleplus.width }}"></div> |
| 13 | + |
| 14 | +<!-- Facebook --> |
| 15 | +<li class="fb"><div class="fb-like" data-send="false" data-layout="{{ site.JB.sharing.facebook.layout }}" data-width="{{ site.JB.sharing.facebook.width }}" data-show-faces="{{ site.JB.sharing.facebook.faces }}" data-font="{{ site.JB.sharing.facebook.font }}"></div> |
| 16 | + |
| 17 | +<!-- Reddit --> |
| 18 | +<li><script type="text/javascript" src="http://www.reddit.com/buttonlite.js?i=4"></script> |
| 19 | +</ul> |
| 20 | + |
| 21 | +<script> |
| 22 | + |
| 23 | +(function(doc, script) { |
| 24 | + |
| 25 | + //Async Social Buttons |
| 26 | + var js, |
| 27 | + fjs = doc.getElementsByTagName(script)[0], |
| 28 | + add = function(url, id) { |
| 29 | + if (doc.getElementById(id)) {return;} |
| 30 | + js = doc.createElement(script); |
| 31 | + js.src = url; |
| 32 | + id && (js.id = id); |
| 33 | + fjs.parentNode.insertBefore(js, fjs); |
| 34 | + }; |
| 35 | + |
| 36 | + // Twitter SDK |
| 37 | + add('//platform.twitter.com/widgets.js', 'twitter-wjs'); |
| 38 | + |
| 39 | + // Google+ button |
| 40 | + add('https://apis.google.com/js/plusone.js'); |
| 41 | + |
| 42 | + // Facebook SDK |
| 43 | + add('//connect.facebook.net/en_GB/all.js#xfbml=1&appId={{ site.JB.sharing.facebook.appid }}', 'facebook-jssdk'); |
| 44 | + |
| 45 | + //Hacker News Button |
| 46 | + var hn_like = document.createElement('iframe'); |
| 47 | + hn_like.frameborder="no"; |
| 48 | + hn_like.scrolling="no"; |
| 49 | + hn_like.height="28px"; |
| 50 | + hn_like.width="110px"; |
| 51 | + hn_like.src = "http://hnlike.com/upvote.php?link=" |
| 52 | + + encodeURIComponent(document.location) |
| 53 | + + "&title=" |
| 54 | + + encodeURIComponent("{{ page.title }}"); |
| 55 | + hn_like.innerHTML="iframes not supported by your browser"; |
| 56 | + |
| 57 | + var where = document.getElementById("hnews"); |
| 58 | + where.parentNode.insertBefore( |
| 59 | + hn_like, |
| 60 | + where |
| 61 | + ); |
| 62 | +}(document, 'script')); |
| 63 | + |
| 64 | +</script> |
0 commit comments