Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twinkle: 提供hook以判定Twinkle載入完成 #282

Open
sunafterrainwm opened this issue Dec 19, 2022 · 0 comments
Open

twinkle: 提供hook以判定Twinkle載入完成 #282

sunafterrainwm opened this issue Dec 19, 2022 · 0 comments

Comments

@sunafterrainwm
Copy link
Contributor

sunafterrainwm commented Dec 19, 2022

如題,希望可以在Twinkle載入完成後觸發一個mw.hook

用例例如重新加入被刪掉的設定按鈕:

mw.hook( 'Twinkle.load' ).add(() => {
    Twinkle.addPortletLink(
        mw.util.getUrl(Twinkle.defaultConfig.configPage),
        mw.libs.HanAssist.localize(['参数设置', '偏好設定']),
        'tw-config'
    );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant