Skip to content

Instantly share code, notes, and snippets.

@osapon
Last active September 28, 2017 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osapon/2222cd8952190ad4c9694f6f0c9bbe38 to your computer and use it in GitHub Desktop.
Save osapon/2222cd8952190ad4c9694f6f0c9bbe38 to your computer and use it in GitHub Desktop.
Bloggerで記事毎の共有ボタンに「Mastoshare」を並べるスクリプト。デザインによってクラスの調整は必要だと思う。
<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>
@osapon
Copy link
Author

osapon commented Sep 28, 2017

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.

@osapon
Copy link
Author

osapon commented Sep 28, 2017

Add with HTML / JavaScript gadget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment