Do not add icons to media viewer image list

e.g. {{refimprove}} on enwiki - there is an icon of a book that is only
meant to be illustrative on the page. It interferes with the page's image
collection and the flow.

Change-Id: Icd7e5885aaf8b31fffe07bd18cc0feb0f76b848c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/229
This commit is contained in:
Mark Holmquist 2014-03-06 15:26:25 -08:00
parent 3f73ea1076
commit 21549d7547

View file

@ -121,6 +121,12 @@
return;
}
if ( $thumb.closest( '.metadata' ).length > 0 ) {
// This is almost certainly an icon for an informational template like
// {{refimprove}} on enwiki.
return;
}
if ( $thumbContain.length !== 0 && $thumbContain.is( '.thumb' ) ) {
$thumbCaption = $thumbContain.find( '.thumbcaption' ).clone();
$thumbCaption.find( '.magnify' ).remove();