* @class mw.plugin.page.watch.ajax
* @singleton
*/
-( function ( mw, $ ) {
+( function () {
var watch,
// The name of the page to watch or unwatch
title = mw.config.get( 'wgRelevantPageName' );
.done( function ( watchResponse ) {
var message, otherAction = action === 'watch' ? 'unwatch' : 'watch';
- if ( mwTitle.getNamespaceId() > 0 && mwTitle.getNamespaceId() % 2 === 1 ) {
+ if ( mwTitle.isTalkPage() ) {
message = action === 'watch' ? 'addedwatchtext-talk' : 'removedwatchtext-talk';
} else {
message = action === 'watch' ? 'addedwatchtext' : 'removedwatchtext';
} );
} );
-}( mediaWiki, jQuery ) );
+}() );