镜像自地址
https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector.git
已同步 2024-06-01 09:50:55 +08:00
Add hooks fired when finished processing compact language links
Bug: T145755 Change-Id: I921191c2cd32d55161b32bad2b2e0d98228cf230
这个提交包含在:
父节点
475c8a87d7
当前提交
908161f0c1
7
hooks.md
7
hooks.md
|
@ -5,6 +5,13 @@ The hook names are prefixed with mw.uls as a convention.
|
|||
|
||||
# List of hooks
|
||||
|
||||
## mw.uls.compactlinks.initialized
|
||||
|
||||
Fired when the rendering of compact language links and
|
||||
the corresponding button is completed.
|
||||
Sends a boolean true argument if the list was actually compacted
|
||||
and the trigger was rendered, and false otherwise.
|
||||
|
||||
## mw.uls.font.change
|
||||
|
||||
Fired when the user changes a webfont.
|
||||
|
|
|
@ -75,6 +75,8 @@
|
|||
|
||||
if ( this.listSize <= max ) {
|
||||
// Not enough languages to compact the list
|
||||
mw.hook( 'mw.uls.compactlinks.initialized' ).fire( false );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -98,6 +100,8 @@
|
|||
}
|
||||
|
||||
this.addTrigger();
|
||||
|
||||
mw.hook( 'mw.uls.compactlinks.initialized' ).fire( true );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
正在加载...
在新工单中引用
屏蔽一个用户