Simple Iconsを使用してカスタムの Pinterest Pin It ボタンを作成しています。Pinterest Widget Builder から提供されたリンクを使用しています。デフォルトの Pin It ボタンでは、このリンクを完全に新しいウィンドウで開きます。私はたくさんの SO の質問を見てきましたが、これらはすべて新しいタブで開きます。
このリンクをタブではなく新しいウィンドウで開く必要があります。
HTML:
<div class="pinit" onclick='window.open("http://www.pinterest.com/pin/create/button/?url=http%3A%2F%2Flocalhost%3A8080%2FHowl%2FHome.html&media=http%3A%2F%2Fi.imgur.com%2FToZz7PB.png&description=Howl%3A%20Share%20Your%20Life")'><img src="http://raw.github.com/danleech/simpleicons/master/icons/pinterest/pinterest-64.png"></div>
CSS:
.pinit {
background: #CB2027;
width: 65px;
border-radius: 10px;
cursor: pointer;
}
.pinit:hover {
background: #e41f11
}
JavaScript:
JS については、Pinterest リンクを使用しました。<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>