Merge pull request #35 from kt286/fix-firefox

fix: firefox open options but popup doesn't close
This commit is contained in:
DIYgod 2019-08-14 23:18:46 +08:00 committed by GitHub
commit ec974fd474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 4 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules
dist
release
release
yarn-error.log

View File

@ -45,7 +45,7 @@ npm install
npm run build
```
**安装扩展:**
**Chrome安装扩展:**
打开 `chrome://extensions/`
@ -55,6 +55,14 @@ npm run build
选择上一步构建出的 `dist` 目录
**Firefox安装扩展**
打开 `about:debugging`
点击右上角 `加载临时扩展程序`
选择上一步构建出的 `dist` 目录中的 `manifest.json` 文件
### 补充 RSSHub 规则
[见文档](https://docs.rsshub.app/joinus/#%E6%8F%90%E4%BA%A4%E6%96%B0%E7%9A%84-rsshub-radar-%E8%A7%84%E5%88%99)

View File

@ -1,6 +1,10 @@
{
"manifest_version": 2,
"applications": {
"gecko": {
"id": "i@diygod.me"
}
},
"name": "RSSHub Radar",
"description": "RSSHub Radar 是 RSSHub 的衍生项目,她可以帮助你快速发现和订阅当前网站的 RSS 和 RSSHub",
"version": "1.1.1",

View File

@ -64,10 +64,12 @@ chrome.runtime.getBackgroundPage((background) => {
});
document.querySelectorAll('a').forEach((ele) => {
ele.addEventListener('click', () => {
ele.addEventListener('click', (e) => {
e.preventDefault();
chrome.tabs.create({
url: ele.getAttribute('href'),
});
window.close();
});
});
});