Last active
September 28, 2017 02:18
-
-
Save osapon/2222cd8952190ad4c9694f6f0c9bbe38 to your computer and use it in GitHub Desktop.
Bloggerで記事毎の共有ボタンに「Mastoshare」を並べるスクリプト。デザインによってクラスの調整は必要だと思う。
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script> | |
$(function() { | |
$('.blog-posts > .date-outer').each(function(idx,obj) { | |
var title = $('.post-title',obj).text(); | |
$('.post-share-buttons',obj).append('<a href="https://mastoshare.net/post.php?text=' + encodeURIComponent(title) + '" onclick="window.open(this.href, \'\', \'width=500,height=400\'); return false;"><img src="https://mastoshare.net/img/toot.svg" width="75" height="20"></a>'); | |
}); | |
}); | |
</script> |
Add with HTML / JavaScript gadget.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A script that arranges "Mastoshare" on the article sharing button in Blogger. I think it is necessary to adjust the class depending on the design.