Gerrit Patch Uploader has uploaded a new change for review.
https://gerrit.wikimedia.org/r/286430
Change subject: Minify JS in jquery.makeCollapsible
......................................................................
Minify JS in jquery.makeCollapsible
Instead of using if checks, use a piping system (like in the first function)
Change-Id: Ib96f9db9c56965c336ac85d9bdcf21bdbb4e9cce
---
M resources/src/jquery/jquery.makeCollapsible.js
1 file changed, 2 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/30/286430/1
diff --git a/resources/src/jquery/jquery.makeCollapsible.js
b/resources/src/jquery/jquery.makeCollapsible.js
index 79e8731..bdb5ce8 100644
--- a/resources/src/jquery/jquery.makeCollapsible.js
+++ b/resources/src/jquery/jquery.makeCollapsible.js
@@ -153,10 +153,7 @@
*/
function togglingHandler( $toggle, $collapsible, e, options ) {
var wasCollapsed, $textContainer, collapseText, expandText;
-
- if ( options === undefined ) {
- options = {};
- }
+ options = options || {};
if ( e ) {
if (
@@ -241,9 +238,7 @@
* @chainable
*/
$.fn.makeCollapsible = function ( options ) {
- if ( options === undefined ) {
- options = {};
- }
+ options = options || {};
this.each( function () {
var $collapsible, collapseText, expandText, $caption,
$toggle, actionHandler, buildDefaultToggleLink,
--
To view, visit https://gerrit.wikimedia.org/r/286430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib96f9db9c56965c336ac85d9bdcf21bdbb4e9cce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Cblair91 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits