Skip to content

Commit 296d856

Browse files
authored
Merge pull request #3 from AkatQuas/master
feat: support for qqmail nonstop redirect
2 parents 6894f98 + 9a50e0d commit 296d856

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

.DS_Store

0 Bytes
Binary file not shown.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Nonstop
2-
Nonstop 是一个 chrome 扩展,用于无感跳转到知乎,微博,简书等无法直接跳转的外链,免去手动跳转的烦恼;同时支持拦截知乎登录弹窗。
2+
Nonstop 是一个 chrome 扩展,用于无感跳转到知乎,微博,简书,QQ 邮箱等无法直接跳转的外链,免去手动跳转的烦恼;同时支持拦截知乎登录弹窗。
33

44
## 使用方法
5-
1. 通过 Edge 扩展应用商店[安装](https://microsoftedge.microsoft.com/addons/detail/nonstop/ncjhljkmeagghpgekhdkaedcbippeaog?hl=zh-CN)
6-
2. 手动安装,[下载](https://github.com/Yuxiaoy1/nonstop/releases/tag/0.2.0) crx 扩展文件,在chrome内核的浏览器扩展页面手动添加。
5+
1. Edge 浏览器可直接通过 Edge 扩展应用商店[安装](https://microsoftedge.microsoft.com/addons/detail/nonstop/ncjhljkmeagghpgekhdkaedcbippeaog?hl=zh-CN)
6+
2. Chromium 内核的非 Edge 浏览器,可[下载](https://github.com/Yuxiaoy1/nonstop/releases) zip 格式文件后解压缩,在浏览器的扩展页面加载解压缩后的 Nonstop 文件夹,即可完成扩展安装。
7+
![加载已解压的扩展程序](https://user-images.githubusercontent.com/24974936/101910150-83427c00-3bf9-11eb-82be-0f8ddd42731b.png)
78

89
## 测试
9-
安装扩展后,点击下方三个链接,均可自动跳转:
10+
安装扩展后,点击下方四个链接,均可自动跳转:
1011
* 知乎外链:[https://link.zhihu.com/?target=https%3A//yuxiaoy.com/](https://link.zhihu.com/?target=https%3A//yuxiaoy.com/)
1112
* 简书外链:[https://www.jianshu.com/go-wild?ac=2&url=https%3A%2F%2Fyuxiaoy.com%2F](https://www.jianshu.com/go-wild?ac=2&url=https%3A%2F%2Fyuxiaoy.com%2F)
1213
* 微博外链:[http://t.cn/A6Gsm8pD](http://t.cn/A6Gsm8pD)
14+
* QQ 邮箱外链:[https://mail.qq.com/cgi-bin/readtemplate?t=safety&check=false&gourl=https%3A%2F%2Ffrontendfoc.us%2Flink%2F85068%2Ff3b21d9455&subtemplate=gray&evil=0](https://mail.qq.com/cgi-bin/readtemplate?t=safety&check=false&gourl=https%3A%2F%2Ffrontendfoc.us%2Flink%2F85068%2Ff3b21d9455&subtemplate=gray&evil=0)
1315

1416
## 免责声明
1517
本扩展开发仅用于学习,严禁任何商业用途。
16-
安装本扩展即代表同意承担使用带来的任意后果,若造成损失与本扩展无关。
18+
安装本扩展即代表同意承担使用带来的任意后果,若造成损失与本扩展无关。

nonstop/.DS_Store

0 Bytes
Binary file not shown.

nonstop/content-script.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
// close zhihu login page when not logged
66
window.onload = () => {
77
let btn = document.querySelector('.Button.Modal-closeButton.Button--plain')
8-
if (btn) {
9-
btn.click()
10-
}
8+
if (btn) btn.click()
119
return
1210
}
1311
}
14-
// redirect for zhihu, weibo sites
15-
let link = document.querySelector('.link')
12+
// redirect for zhihu, weibo, qqmail sites
13+
let link = document.querySelector('.link') || document.querySelector('.safety-url')
1614
let url = link ? link.textContent : ''
1715
if (url) {
1816
window.location.href = url
@@ -25,7 +23,5 @@
2523
return res
2624
}
2725
url = getParams('url')
28-
if (url) {
29-
window.location.href = url
30-
}
31-
})();
26+
if (url) window.location.href = url
27+
})()

nonstop/manifest.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"manifest_version": 2,
33
"name": "Nonstop",
4-
"version": "0.2.0",
5-
"description": "无感直达知乎,微博,简书等无法直接跳转的外链,免去手动跳转的烦恼;同时支持拦截知乎登录弹窗。",
4+
"version": "0.2.1",
5+
"description": "无感直达知乎,微博,简书,QQ邮箱等无法直接跳转的外链,免去手动跳转的烦恼;同时支持拦截知乎登录弹窗。",
66
"author": "yuxiaoy",
77
"icons": {
88
"48": "icon.png",
@@ -16,8 +16,9 @@
1616
"matches": ["*://link.zhihu.com/?target=*",
1717
"*://t.cn/*",
1818
"*://www.jianshu.com/go-wild?ac=2&url=*",
19-
"*://www.zhihu.com/question/*"
19+
"*://www.zhihu.com/question/*",
20+
"*://mail.qq.com/cgi-bin/readtemplate?t=safety*"
2021
],
2122
"js": ["content-script.js"]
2223
}]
23-
}
24+
}

0 commit comments

Comments
 (0)