Skip to content

Instantly share code, notes, and snippets.

@bsalim
Created July 11, 2013 02:43

Revisions

  1. bsalim created this gist Jul 11, 2013.
    22 changes: 22 additions & 0 deletions Weibo Sharing button
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    <script type="text/javascript" charset="utf-8">
    (function(){
    var _w = 72 , _h = 16;
    var param = {
    url:location.href,
    type:'3',
    count:'1',
    appkey:'',
    title:'',
    pic:'',
    ralateUid:'',
    language:'en_us',
    rnd:new Date().valueOf()
    }

    var temp = [];
    for( var p in param ){
    temp.push(p + '=' + encodeURIComponent( param[p] || '' ) )
    }
    document.write('<iframe allowTransparency="true" frameborder="0" scrolling="no" src="http://hits.sinajs.cn/A1/weiboshare.html?' + temp.join('&') + '" width="'+ _w+'" height="'+_h+'"></iframe>')
    })()
    </script>