* Using titles instead of title which is deprecated
* Allow operation on multiple pages
Follow up of I820dcb64d469616b10741df013911197cc5bde29
Change-Id: Ic77b546c256fa70f253c7508defe4c0002258b2a
* @private
* @context mw.Api
*
- * @param {String|mw.Title} page Full page name or instance of mw.Title
+ * @param {string|mw.Title|string[]|mw.Title[]} page Full page name or instance of mw.Title or array of pages
* @param {Function} [ok] Success callback (deprecated)
* @param {Function} [err] Error callback (deprecated)
* @return {jQuery.Promise}
params = {
action: 'watch',
- title: String( page ),
+ titles: $.isArray( page ) ? page.join( '|' ) : String( page ),
token: mw.user.tokens.get( 'watchToken' ),
uselang: mw.config.get( 'wgUserLanguage' )
};