Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnpoint/anti-360browser.js
https://github.com/johnpoint/anti-360browser.js
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/johnpoint/anti-360browser.js
- Owner: johnpoint
- License: mit
- Created: 2018-12-21T14:29:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-15T05:06:24.000Z (over 5 years ago)
- Last Synced: 2024-11-01T13:35:50.627Z (2 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 23
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# anti-360browser.js
一个检测浏览器是否是360浏览器的 js
## 使用
直接引用 `https://raw.githubusercontent.com/johnpoint/anti-360browser.js/master/anti-360browser.js` 即可警告!如果没意外的话,这个js执行以后将覆盖网页的内容,如果不想覆盖网页的内容需要将
```
if (new Browser().browser == '360' || new Browser().browser == '360SE' || new Browser().browser == '360SE') {
window.alert('请不要使用360浏览器');
document.write('请不要使用360浏览器
')
}
```
改为
```
if (new Browser().browser == '360' || new Browser().browser == '360SE' || new Browser().browser == '360SE') {
window.alert('请不要使用360浏览器');
}
```## 效果
![Selection_007.png](https://i.loli.net/2018/12/21/5c1cff0c565c6.png)
![Selection_008.png](https://i.loli.net/2018/12/21/5c1cffd2d26ab.png)
## 感谢核心代码:
[mumuy](https://github.com/mumuy) 的 浏览器分析判断工具
项目地址:https://github.com/mumuy/browser