mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 09:42:11 +00:00
Merge "Add event logging for Realtime Preview enabling and disabling"
This commit is contained in:
commit
8954cb96cd
|
@ -269,4 +269,16 @@
|
|||
$textarea.wikiEditor( 'addModule', dialogsConfig.getDefaultConfig() );
|
||||
|
||||
};
|
||||
|
||||
// Add logging for Realtime Preview.
|
||||
mw.hook( 'ext.WikiEditor.realtimepreview.enable' ).add( function () {
|
||||
logEditFeature( 'preview', 'preview-realtime-on' );
|
||||
} );
|
||||
mw.hook( 'ext.WikiEditor.realtimepreview.inuse' ).add( function () {
|
||||
logEditFeature( 'preview', 'preview-realtime-inuse' );
|
||||
} );
|
||||
mw.hook( 'ext.WikiEditor.realtimepreview.disable' ).add( function () {
|
||||
logEditFeature( 'preview', 'preview-realtime-off' );
|
||||
} );
|
||||
|
||||
}() );
|
||||
|
|
|
@ -15,5 +15,6 @@ mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
|
|||
} );
|
||||
if ( realtimePreview.getUserPref() ) {
|
||||
realtimePreview.enable();
|
||||
mw.hook( 'ext.WikiEditor.realtimepreview.inuse' ).fire( this );
|
||||
}
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue