使用说明
下载后将文件夹名改为 XQUserAgent,上传至网站目录的 /usr/plugins
启用插件,在需要显示的地方(侧栏评论也可以)插入以下代码:
<?php XQUserAgent_Plugin::render($comments->agent); ?>
获取Windows11教程
此修改要站点支持HTTPS以及必须是typecho1.1以上版本
(要修改Typecho程序 介意可以绕过这个)
找到根目录的/var/Typecho/Widget/Request.php文件 大概253行左右搜索getAgent就能找到
把return $this->request->getAgent();注释掉
然后插入以下代码即可兼容Windows11;
if(isset($_COOKIE['win11'])){
return str_replace("Windows NT 10.0","Windows NT 11.0",$this->request->getAgent());
}else{
return $this->request->getAgent();
}
评论 (0)