mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 10:11:45 +00:00
e9b583d1c3
Now also works if the "follow-up" comment is wrapped in e.g. `<small>`. Change-Id: Ic37cb6afdb42021f109a1818f5c4299d907ed094
31 lines
801 B
JavaScript
31 lines
801 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' )
|
|
};
|