mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-12 09:58:17 +00:00
9fab4add17
Currently use2017Wikitext is missing some implementations. Change-Id: Ib5f9bcc588561a80ca11de85518e6fae64e5b104
32 lines
838 B
JavaScript
32 lines
838 B
JavaScript
var controller = require( './controller.js' );
|
|
|
|
/**
|
|
* @class mw.dt
|
|
* @singleton
|
|
*/
|
|
mw.dt = {};
|
|
|
|
if ( new mw.Uri().query.dtdebug ) {
|
|
mw.loader.load( 'ext.discussionTools.debug' );
|
|
} else if ( mw.config.get( 'wgIsProbablyEditable' ) ) {
|
|
mw.hook( 'wikipage.content' ).add( function ( $container ) {
|
|
$container.find( '.mw-parser-output' ).each( function () {
|
|
var $node = $( this );
|
|
// Don't re-run if we already handled this element
|
|
// eslint-disable-next-line no-jquery/no-class-state
|
|
if ( !$node.hasClass( 'dt-init-done' ) ) {
|
|
controller.init( $node );
|
|
}
|
|
} );
|
|
} );
|
|
}
|
|
|
|
module.exports = {
|
|
controller: require( './controller.js' ),
|
|
parser: require( './parser.js' ),
|
|
modifier: require( './modifier.js' ),
|
|
utils: require( './utils.js' ),
|
|
logger: require( './logger.js' ),
|
|
config: require( './config.json' )
|
|
};
|