Browse Source

cnzz check standalone

dev
xmcp 6 years ago
parent
commit
480969519c
  1. 76
      README.md
  2. 1
      public/index.html
  3. 17
      src/Title.js

76
README.md

@ -1,39 +1,37 @@
React 版 P大树洞,[pkuhelper.pku.edu.cn/hole](http://pkuhelper.pku.edu.cn/hole/)
与 PKU Helper 客户端的树洞模块比较,本项目……
**支持** PKU Helper 树洞**支持**的以下功能:
- 瀑布流
- 查看文字、图片、语音树洞
- 查看树洞的发送时间、回复数量、关注数量
- 查看回复
- 按关键词搜索树洞
- 按编号搜索树洞
- URL和树洞编号识别
- 登录账号
- 查看关注的树洞
- 发表文字、图片树洞
- 发表文字回复
- 关注树洞
- 举报树洞
**支持** PKU Helper 树洞**不支持**的以下功能:
- 在各种操作系统中使用
- 显示无限条搜索结果
- 智能调整上传图片的质量
- 用颜色区分不同人的回复
- 自动显示提到的树洞
- 突出显示未读树洞
- 精确显示发帖时间
- 复制树洞链接和全文
- 快捷键和 3D Touch 支持
- 自定义背景图片
- 检测树洞和回复被删除(默认不开启)
- 用 Token 登录
**不支持** PKU Helper 树洞**支持**的以下功能:
- 搜索时筛选有图片、语音的树洞
- 发表语音树洞
PKU Helper 网页版 P大树洞:[pkuhelper.pku.edu.cn/hole](https://pkuhelper.pku.edu.cn/hole/)
## 浏览器兼容
下表为当前 PKU Helper 网页版的浏览器兼容目标:
| 平台 | Desktop | | | Windows | | macOS | iOS | | Android | |
| -------- | ------- | -------------------------- | ------- | -------- | ---- | ------ | ------ | ------------------- | ------- | ----------------------- |
| 浏览器 | Chrome | Chromium<br />(国产浏览器) | Firefox | EdgeHTML | IE | Safari | Safari | 微信<br />(WebView) | Chrome | Chromium<br />(WebView) |
| 优先兼容 | 76+ | 无 | 最新版 | 无 | 无 | 无 | 12+ | 无 | 最新版 | 无 |
| 兼容 | 56+ | 最新版 | 56+ | 最新版 | 无 | 10+ | 10+ | 最新版 | 56+ | 最新版 |
| 不兼容 | 其他 | 其他 | 其他 | 其他 | 全部 | 其他 | 其他 | 其他 | 其他 | 其他 |
**优先兼容** 指不应有 bug 和性能问题,可以 Polyfill 的功能尽可能提供,若发现问题会立刻修复。
**兼容** 指不应有恶性 bug 和严重性能问题,若发现问题会在近期修复。
**不兼容** 指在此种浏览器上访问本网站是未定义行为,问题反馈一般会被忽略。
`num+` 指符合版本号 `num` 的最新版本及后续所有版本。`最新版` 以 stable 分支为准。
## 问题反馈
对 PKU Helper 网页版的 bug 反馈请在相应仓库提交 Issue。
欢迎提出功能和 UI 建议,但可能不会被采纳。根据 GPL,你有权自行实现你的想法。
不方便在 GitHub 上说明的问题可以邮件 xmcp at pku dot edu dot cn。邮件内容可能会被公开。
对 PKU Helper 后端服务、客户端、账号、树洞内容的反馈请联系相应人员,或邮件 helper at pku dot edu dot cn。
## License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.zh-cn.html) for more details.

1
public/index.html

@ -31,6 +31,7 @@
var _czc=_czc||[];
_czc.push(["_setAccount","1274501752"]);
_czc.push(["_setCustomVar","has_token",localStorage['TOKEN']?'yes':'no',1]);
_czc.push(["_setCustomVar","standalone",((window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone))?'yes':'no',1]);
try {
var config=JSON.parse(localStorage['hole_config']||'{}');
for(var key in config)

17
src/Title.js

@ -27,16 +27,19 @@ const HELP_TEXT=(
<p>
<a onClick={()=>{
if('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then((reg)=>{
console.log('unregister service worker:',reg);
reg.unregister();
});
navigator.serviceWorker.getRegistrations()
.then((registrations)=>{
for(let registration of registrations) {
console.log('unregister',registration);
registration.unregister();
}
});
}
setTimeout(()=>{
window.location.refresh(true);
window.location.reload(true);
},200);
}}>强制更新</a>
当前程序版本 [{process.env.REACT_APP_BUILD_INFO||'---'}] {process.env.NODE_ENV}
}}>强制检查更新</a>&nbsp;
([{process.env.REACT_APP_BUILD_INFO||'---'}] {process.env.NODE_ENV})
</p>
<p>
This program is free software: you can redistribute it and/or modify

Loading…
Cancel
Save