dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid Sizzle's :first/:last selectors. Use $.first()/$.last()
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki.page.gallery.js
diff --git
a/resources/src/mediawiki.page.gallery.js
b/resources/src/mediawiki.page.gallery.js
index
ff27c58
..
7d098e6
100644
(file)
--- a/
resources/src/mediawiki.page.gallery.js
+++ b/
resources/src/mediawiki.page.gallery.js
@@
-4,7
+4,7
@@
* - Toggle gallery captions when focused.
* - Dynamically resize images to fill horizontal space.
*/
* - Toggle gallery captions when focused.
* - Dynamically resize images to fill horizontal space.
*/
-( function (
mw, $
) {
+( function () {
var $galleries,
bound = false,
lastWidth = window.innerWidth,
var $galleries,
bound = false,
lastWidth = window.innerWidth,
@@
-45,8
+45,8
@@
// Note that if we do have a real image, using this method will generally
// give the same answer, but can be different in the case of a very
// narrow image where extra padding is added.
// Note that if we do have a real image, using this method will generally
// give the same answer, but can be different in the case of a very
// narrow image where extra padding is added.
- imgHeight = $this.children().children( 'div
:first'
).height();
- imgWidth = $this.children().children( 'div
:first'
).width();
+ imgHeight = $this.children().children( 'div
' ).first(
).height();
+ imgWidth = $this.children().children( 'div
' ).first(
).width();
}
// Hack to make an edge case work ok
}
// Hack to make an edge case work ok
@@
-281,9
+281,9
@@
if ( !bound ) {
bound = true;
$( window )
if ( !bound ) {
bound = true;
$( window )
- .
resize(
$.debounce( 300, true, handleResizeStart ) )
- .
resize(
$.debounce( 300, handleResizeEnd ) );
+ .
on( 'resize',
$.debounce( 300, true, handleResizeStart ) )
+ .
on( 'resize',
$.debounce( 300, handleResizeEnd ) );
}
} );
} );
}
} );
} );
-}(
mediaWiki, jQuery
) );
+}() );