Skip to content

Commit 1c9021b

Browse files
committed
optimize
move the share scripts to the bottom of the page
1 parent 991cd79 commit 1c9021b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/index.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,10 @@
3232
</li>
3333
<li>
3434
<div id="sliphover_share">
35-
<iframe src="http://ghbtns.com/github-btn.html?user=Wayou&repo=SlipHover&type=watch"
35+
<iframe src="http://ghbtns.com/github-btn.html?user=Wayou&repo=SlipHover&type=watch&count=true"
3636
allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20"></iframe>
3737
<div class="g-plus" data-action="share" data-annotation="bubble"></div>
38-
<script type="text/javascript">
39-
(function() {
40-
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
41-
po.src = 'https://apis.google.com/js/platform.js';
42-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
43-
})();
44-
</script>
4538
<a href="https://twitter.com/share" class="twitter-share-button" data-via="liuwayong">Tweet</a>
46-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
4739
</div>
4840
</li>
4941
</ul>
@@ -338,5 +330,13 @@ <h1>About</h1>
338330
ga('create', 'UA-46794744-1', 'wayou.github.io');
339331
ga('send', 'pageview');
340332
</script>
333+
<script type="text/javascript">
334+
(function() {
335+
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
336+
po.src = 'https://apis.google.com/js/platform.js';
337+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
338+
})();
339+
</script>
340+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
341341
</body>
342342
</html>

0 commit comments

Comments
 (0)