Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/149866
Change subject: WIP: Hooks documentation ...................................................................... WIP: Hooks documentation Change-Id: If937d62523c42574c9edef5fcd9e5f26f3426af8 --- M CONTRIBUTING.md A hooks.txt 2 files changed, 42 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/66/149866/1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 784d39a..b2d3831 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,6 +81,12 @@ Git commit messages should follow the conventions described in <https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines>. +### Events and hooks + +Whenever possible, use the mw.hook framework for JavaScript events. + +Document each hook that you add in the hooks.txt file. + ### Documentation comments * End sentences in a full stop. diff --git a/hooks.txt b/hooks.txt new file mode 100644 index 0000000..cd1cdcb --- /dev/null +++ b/hooks.txt @@ -0,0 +1,36 @@ +mw.cx.error + +Fired whenever an error occurs. The parameter is a string (message) that will be shown +in the info bar. + +mw.cx.error.anonuser + +Fired when the frontend identifies that the user is anonymous. + +mw.cx.progress + +Fired when the translation progress is recalculated. + +mw.cx.publish +mw.cx.publish.captcha +mw.cx.search.link +mw.cx.search.word +mw.cx.select.link +mw.cx.select.reference +mw.cx.select.word +mw.cx.source.loaded +mw.cx.source.ready +mw.cx.source.select +mw.cx.success +mw.cx.tools.ready +mw.cx.tools.shown +mw.cx.translate.create +mw.cx.translation.add +mw.cx.translation.change +mw.cx.translation.clear +mw.cx.translation.edit +mw.cx.translation.focus +mw.cx.translation.postMT +mw.cx.translation.ready +mw.cx.translation.updated +mw.cx.warning.mtabuse -- To view, visit https://gerrit.wikimedia.org/r/149866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If937d62523c42574c9edef5fcd9e5f26f3426af8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits