Skip to content

Commit

Permalink
fix(script): 修复通知和版本日志在有些页面访问不了的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Apr 4, 2023
1 parent a11b2a5 commit 7fa694a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/scripts/src/projects/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const CommonProject = Project.create({
async onrender({ panel }) {
panel.body.replaceChildren('加载中...');
const md = await request('https://cdn.ocsjs.com/articles/ocs/notify.md', {
type: 'fetch',
type: 'GM_xmlhttpRequest',
responseType: 'text',
method: 'get'
});
Expand Down Expand Up @@ -407,13 +407,13 @@ export const CommonProject = Project.create({
* 清空搜索结果
*/
clearResults: () => {
$store.setTab(TAB_WORK_RESULTS_KEY, []);
return $store.setTab(TAB_WORK_RESULTS_KEY, []);
},
getResults(): Promise<SimplifyWorkResult[]> | undefined {
return $store.getTab(TAB_WORK_RESULTS_KEY) || undefined;
},
setResults(results: SimplifyWorkResult[]) {
$store.setTab(TAB_WORK_RESULTS_KEY, results);
return $store.setTab(TAB_WORK_RESULTS_KEY, results);
}
};
},
Expand Down Expand Up @@ -772,7 +772,7 @@ export const CommonProject = Project.create({
async onrender({ panel }) {
panel.body.replaceChildren('加载中...');
const md = await request('https://cdn.ocsjs.com/articles/ocs/changelog.md', {
type: 'fetch',
type: 'GM_xmlhttpRequest',
responseType: 'text',
method: 'get'
});
Expand Down

0 comments on commit 7fa694a

Please sign in to comment.