最新最详细步骤给博客增加侧边栏打赏功能

1、先申请开通JS权限,一般一天之内就会通过

  设置→博客侧边栏公告(支持HTML代码) (申请支持 JS 代码)

2、上传好你的支付宝及微信二维码到你的博客园文件里面

 

 3、下载tctip打赏插件,路径为https://github.com/greedying/tctip(当然也可以先不下载,直接引用 src="//static.tctip.com/tctip-1.0.4.min.js"

下载后,也上传到文件中

4、设置→博客侧边栏公告

 填入js代码

<script type="text/javascript" src="http://files.cnblogs.com/files/defly/tctip-1.0.2.min.js"></script>
<script>
        new tctip({
    top: '15%',
    button: {
      id: 9,
      type: 'zanzhu'
    },
    list: [
      {
        type: 'alipay',
        qrImg: 'http://files.cnblogs.com/files/defly/zfb01.bmp'
      }, {
        type: 'wechat',
        qrImg: 'http://files.cnblogs.com/files/defly/wechat01.bmp'
      }
    ]
  }).init()
</script>

 

 这里改成你的博客园文件路径即可,对应里面的配置参数可以根据GitHub了解

5、保存后就可以看到侧边栏打算功能

posted @ 2020-07-01 11:12  Defly  阅读(192)  评论(0编辑  收藏  举报