From aeaed2ee3559765656b04e9ac4ae9d4e7d7cbf70 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 28 Jul 2019 18:20:31 +0800 Subject: [PATCH] docs: update screenshot --- README.md | 8 ++++++-- src/js/common/config.js | 22 ++++++++++++++-------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cad4132..93e6540 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,14 @@ ## 介绍 -![](https://i.imgur.com/9oZpzJe.jpg) - [Telegram 群](https://t.me/rsshub) +RSSHub Radar 是 [RSSHub](https://github.com/DIYgod/RSSHub) 的衍生项目,她是一个可以帮助你快速发现和订阅当前网站自带的 RSS 及支持当前网站的 RSSHub 的浏览器扩展 + +![](https://i.imgur.com/3z6kCEQ.jpg) + +![](https://i.imgur.com/euEIwkG.jpg) + ## 安装 diff --git a/src/js/common/config.js b/src/js/common/config.js index c0c62d8..84e0b41 100644 --- a/src/js/common/config.js +++ b/src/js/common/config.js @@ -12,9 +12,13 @@ export const defaultConfig = { }; export function getConfig (success) { - chrome.storage.local.get('config', (result) => { - success(Object.assign({}, defaultConfig, result.config)); - }); + if (chrome.storage) { + chrome.storage.local.get('config', (result) => { + success(Object.assign({}, defaultConfig, result.config)); + }); + } else { + success(defaultConfig); + } } export function saveConfig (config, success) { @@ -22,9 +26,11 @@ export function saveConfig (config, success) { config.rsshubDomain = defaultConfig.rsshubDomain; } config.rsshubDomain = config.rsshubDomain.replace(/\/$/, ''); - chrome.storage.local.set({ - config, - }, () => { - success(); - }); + if (chrome.storage) { + chrome.storage.local.set({ + config, + }, () => { + success(); + }); + } } \ No newline at end of file