soarli

给typecho加上心知天气
将以下代码复制到component/headnav.php搜索提示段落下方即可<!-- 心知天气-->...
扫描右侧二维码阅读全文
22
2020/01

给typecho加上心知天气

将以下代码复制到component/headnav.php搜索提示段落下方即可

<!-- 心知天气-->
    <div id="tp-weather-widget" class="navbar-form navbar-form-sm navbar-left shift"></div>
<script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script","tpwidget","//widget.seniverse.com/widget/chameleon.js"))</script>
<script>tpwidget("init", {
    "flavor": "slim",
    "location": "WX4FBXXFKE4F",
    "geolocation": "enabled",
    "language": "auto",
    "unit": "c",
    "theme": "chameleon",
    "container": "tp-weather-widget",
    "bubble": "enabled",
    "alarmType": "badge",
    "color": "#C6C6C6",
    "uid": "填写你的UID",
    "hash": "密钥"
});
tpwidget("show");</script>
<!-- 心知结束-->

UID填写公钥,hash是私钥。

原文地址:

https://mgxfd.club/20.html

最后修改:2022 年 01 月 07 日 06 : 14 PM

发表评论