diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index f92ff9041..4efd48d8f 100644 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -335,6 +335,14 @@ // do not treat categories as galleries - the autogenerated caption they have is not helpful return $thumbContain.closest( '#mw-category-media' ).length; } ) + .not( function () { + // do not treat special file related pages as galleries + var $specialFileRelatedPages = $( '.page-Special_NewFiles, .page-Special_MostLinkedFiles\ + , .page-Special_MostGloballyLinkedFiles\ + , .page-Special_UncategorizedFiles, .page-Special_UnusedFiles' + ); + return $thumbContain.closest( $specialFileRelatedPages ).length; + } ) .find( '.gallerytext' ) .clone(); }