wanichanの日記

ちょっとした技術メモ。Microsoft中心。Webサイト管理等にまつわるネタ、サイトの更新情報等を発信中。最終版はwanichan.comに掲載していきます。

Google+ ボタンのカウンターが廃止?

今朝みてみたら、Google+ボタンのカウンターが消えてました。

f:id:wanichan:20170718091337p:plain

どうやら、ページの読み込みをよりスピーディーにするためにカウンターが廃止されたようです。

plus.google.com

そしたらコードの差し替えが要るやん?って感じでっせホンマ。

+1 Button  |  Google+ Platform for Web  |  Google Developers

f:id:wanichan:20170718091622p:plain

+1情報は「なし」にした状態で一番でかいのは「tall」かと思います。

<!-- +1 ボタン を表示したい位置に次のタグを貼り付けてください。 -->
<div class="g-plusone" data-size="tall" data-annotation="none"></div>

<!-- 最後の +1 ボタン タグの後に次のタグを貼り付けてください。 -->
<script type="text/javascript">
window.___gcfg = {lang: 'ja'};

(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

 ちなみに、tallにするとSNSのリストの横並びの vertical-align:bottomにすると下にずれるので、CSSをこんな感じにしてます。!important だらけですやん。

 /* Social bottons */
.social-buttons{margin:0 !important;list-style-type:none; padding:0 !important;height:60px}
.social-buttons li{
float:left;margin-right:0.3em;vertical-align:bottom;
}

.fb-like { /* Facebook */
display: inline-block;
height: 20px;
overflow: hidden;
}
.fb_iframe_widget > span {
vertical-align: baseline !important;
}
#___plusone_0,#___plusone_1,#___plusone_2 {
vertical-align:-4px !important;
}
.pocket-btn { /* Pocket */
display: inline-block;
height: 20px;
overflow: hidden;
}
.pocket-btn iframe { /* Pocket */
width: 95px !important;
overflow: hidden;
}

.sns{
margin:0 !important;list-style-type:none; padding:0 !important;}