mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-24 18:59:45 +00:00
Ignore generated captions on special file related pages
Most special pages which list images generate a caption using various information and MediaViewer displays this caption.It should fall back to the file description instead. Bug: T85234 Change-Id: I5448e5de7d6f8de9852a2a845400299b6b51b8ef
This commit is contained in:
parent
9258418a64
commit
36ad534988
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue