Use mw.util.getUrl( null ) to get the default mw.config.get( 'wgPageName' )
[lhc/web/wiklou.git] / resources / src / mediawiki.page.image.pagination.js
index 1823ef0..a0ac0ca 100644 (file)
@@ -2,7 +2,7 @@
  * Implement AJAX navigation for multi-page images so the user may browse without a full page reload.
  */
 
-( function ( mw, $ ) {
+( function () {
        var jqXhr, $multipageimage, $spinner,
                cache = {},
                cacheOrder = [];
                        // Generate the same URL on client side as the one generated in ImagePage::openShowImage.
                        // We avoid using the URL in the link directly since it could have been manipulated (T68608)
                        page = Number( mw.util.getParamValue( 'page', this.href ) );
-                       url = mw.util.getUrl( mw.config.get( 'wgPageName' ), { page: page } );
+                       url = mw.util.getUrl( null, { page: page } );
 
                        switchPage( url );
                        e.preventDefault();
                        } );
                }
        } );
-}( mediaWiki, jQuery ) );
+}() );