fix: no chrome.i18n in sandbox
This commit is contained in:
parent
87e868e12b
commit
1d7a7d04cb
|
|
@ -146,13 +146,13 @@ export function getPageRSSHub(data: {
|
|||
(parsed) => {
|
||||
if (parsed) {
|
||||
result.push({
|
||||
title: formatBlank(rules[domain]._name ? chrome.i18n.getMessage('current') : '', rule[recog.handler].title),
|
||||
title: formatBlank(rules[domain]._name ? 'Current' : '', rule[recog.handler].title),
|
||||
url: '{rsshubDomain}' + parsed,
|
||||
path: parsed,
|
||||
});
|
||||
} else {
|
||||
result.push({
|
||||
title: formatBlank(rules[domain]._name ? chrome.i18n.getMessage('current') : '', rule[recog.handler].title),
|
||||
title: formatBlank(rules[domain]._name ? 'Current' : '', rule[recog.handler].title),
|
||||
url: rule[recog.handler].docs,
|
||||
isDocs: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ function RSSItem({
|
|||
if (type === 'currentPageRSSHub' && config.rsshubAccessControl.accessKey) {
|
||||
url = `${url}?code=${new MD5().update(item.path + config.rsshubAccessControl.accessKey).digest('hex')}`
|
||||
}
|
||||
if (type === 'currentPageRSSHub') {
|
||||
item.title = item.title.replace(/^Current/, chrome.i18n.getMessage('current'));
|
||||
}
|
||||
url = encodeURI(url);
|
||||
const encodedUrl = encodeURIComponent(url);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue