Skip to content

Commit

Permalink
feat(Mainpage_JS): add link to project list (#1549)
Browse files Browse the repository at this point in the history
* feat(Mainpage_JS): add link to project list
  • Loading branch information
WaitSpringQW authored Oct 17, 2024
1 parent d03b4d3 commit dfd41f8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dist/Mainpage_JS/Mainpage_JS.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/Mainpage_JS/Mainpage_JS.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {addSisterProjectLinks} from './modules/addSisterProjectLinks';
import {getBody} from 'ext.gadget.Util';
import {newLinkUnwrap} from './modules/newLinkUnwrap';

Expand All @@ -8,5 +9,6 @@ void getBody().then(($body: JQuery<HTMLBodyElement>): void => {
return;
}

addSisterProjectLinks();
newLinkUnwrap($body);
});
12 changes: 12 additions & 0 deletions src/Mainpage_JS/modules/addSisterProjectLinks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 添加链接以显示“求闻”系列项目项目
const addSisterProjectLinks = () => {
mw.util.addPortletLink(
'p-lang',
mw.util.getUrl('Qiuwen:“求闻”系列项目'),
window.wgULS('“求闻”系列项目列表', '「求聞」系列項目列表'),
'project-completelist',
window.wgULS('“求闻”系列项目列表', '「求聞」系列項目列表')
);
};

export {addSisterProjectLinks};

0 comments on commit dfd41f8

Please sign in to comment.