docs: update screenshot

This commit is contained in:
DIYgod 2019-07-28 18:20:31 +08:00
parent f93ac6c13a
commit aeaed2ee35
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
2 changed files with 20 additions and 10 deletions

View File

@ -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)
## 安装
<a href="https://chrome.google.com/webstore/detail/kefjpfngnndepjbopdmoebkipbgkggaa"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_128x128.png" width="48" /></a>

View File

@ -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();
});
}
}