mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-23 15:56:47 +00:00
Merge "Use a.mw-file-description to find thumbs"
This commit is contained in:
commit
8161b14ea0
|
@ -188,6 +188,7 @@ const HtmlUtils = require( './mmv.HtmlUtils.js' );
|
|||
this.$thumbs = $content.find(
|
||||
'.gallery .image img, ' +
|
||||
'a.image img, ' +
|
||||
'a.mw-file-description img, ' +
|
||||
'#file a img'
|
||||
);
|
||||
|
||||
|
@ -268,7 +269,7 @@ const HtmlUtils = require( './mmv.HtmlUtils.js' );
|
|||
processThumb( thumb ) {
|
||||
let title;
|
||||
const $thumb = $( thumb );
|
||||
const $link = $thumb.closest( 'a.image' );
|
||||
const $link = $thumb.closest( 'a.image, a.mw-file-description' );
|
||||
const $thumbContainer = $link.closest( '.thumb' );
|
||||
const $enlarge = $thumbContainer.find( '.magnify a' );
|
||||
const link = $link.prop( 'href' );
|
||||
|
|
|
@ -31,7 +31,7 @@ module.exports = base;
|
|||
return;
|
||||
}
|
||||
|
||||
$document.on( 'click.mmv-head', 'a.image', ( e ) => {
|
||||
$document.on( 'click.mmv-head', 'a.image, a.mw-file-description', ( e ) => {
|
||||
// Do not interfere with non-left clicks or if modifier keys are pressed.
|
||||
// Also, make sure we do not get in a loop.
|
||||
if ( ( e.button !== 0 && e.which !== 1 ) || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey || e.replayed ) {
|
||||
|
|
Loading…
Reference in a new issue