Jack Phoenix has submitted this change and it was merged.

Change subject: Moved the jQuery easing stuff (WH.supplementAnimations) into 
its own file.
......................................................................


Moved the jQuery easing stuff (WH.supplementAnimations) into its own file.

Change-Id: If44173652bd36655ab05ac58306e45a54af5ede2
---
M resources/js/bluesky.js
A resources/js/jquery.easing.js
2 files changed, 43 insertions(+), 47 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/resources/js/bluesky.js b/resources/js/bluesky.js
index a084a5d..68a09cf 100644
--- a/resources/js/bluesky.js
+++ b/resources/js/bluesky.js
@@ -689,51 +689,6 @@
 
 $( document ).ready( WH.maybeDisplayTopSocialCTA );
 
-WH.supplementAnimations = function () {
-       // add our slick easing
-       $.extend( $.easing, {
-               easeInOutQuad: function( x, t, b, c, d ) {
-                       if ( ( t /= d / 2 ) < 1 ) {
-                               return c / 2 * t * t + b;
-                       }
-                       return -c / 2 * ( ( --t ) * ( t - 2 ) - 1 ) + b;
-               },
-               easeInOutQuint: function( x, t, b, c, d ) {
-                       if ( ( t /= d / 2 ) < 1 ) {
-                               return c / 2 * t * t * t * t * t + b;
-                       }
-                       return c / 2 * ( ( t -= 2 ) * t * t * t * t + 2 ) + b;
-               },
-               easeInOutQuart: function( x, t, b, c, d ) {
-                       if ( ( t /= d / 2 ) < 1 ) {
-                               return c / 2 * t * t * t * t + b;
-                       }
-                       return -c / 2 * ( ( t -= 2 ) * t * t * t - 2 ) + b;
-               },
-               easeInOutExpo: function( x, t, b, c, d ) {
-                       if ( t === 0 ) {
-                               return b;
-                       }
-                       if ( t == d ) {
-                               return b + c;
-                       }
-                       if ( ( t /= d / 2 ) < 1 ) {
-                               return c / 2 * Math.pow( 2, 10 * ( t - 1 ) ) + 
b;
-                       }
-                       return c / 2 * ( -Math.pow( 2, -10 * --t ) + 2 ) + b;
-               },
-               easeInOutBack: function( x, t, b, c, d, s ) {
-                       if ( s === undefined ) {
-                               s = 1.70158;
-                       }
-                       if ( ( t /= d / 2 ) < 1 ) {
-                               return c / 2 * ( t * t * ( ( ( s *= ( 1.525 ) ) 
+ 1 ) * t - s ) ) + b;
-                       }
-                       return c / 2 * ( ( t -= 2 ) * t * ( ( ( s *= ( 1.525 ) 
) + 1 ) * t + s ) + 2 ) + b;
-               }
-       } );
-}
-
 function initAdminMenu() {
        $( 'ul#tabs li' ).hover( function () {
                var that = $( this );
@@ -747,8 +702,6 @@
 var on_menu = false;
 
 function initTopMenu() {
-       WH.supplementAnimations();
-
        var on_menu = false;
 
        // intelligent delay so we don't have flickering menus
diff --git a/resources/js/jquery.easing.js b/resources/js/jquery.easing.js
new file mode 100644
index 0000000..125b59e
--- /dev/null
+++ b/resources/js/jquery.easing.js
@@ -0,0 +1,43 @@
+( function ( $ ) {
+       $.extend( $.easing, {
+               easeInOutQuad: function( x, t, b, c, d ) {
+                       if ( ( t /= d / 2 ) < 1 ) {
+                               return c / 2 * t * t + b;
+                       }
+                       return -c / 2 * ( ( --t ) * ( t - 2 ) - 1 ) + b;
+               },
+               easeInOutQuint: function( x, t, b, c, d ) {
+                       if ( ( t /= d / 2 ) < 1 ) {
+                               return c / 2 * t * t * t * t * t + b;
+                       }
+                       return c / 2 * ( ( t -= 2 ) * t * t * t * t + 2 ) + b;
+               },
+               easeInOutQuart: function( x, t, b, c, d ) {
+                       if ( ( t /= d / 2 ) < 1 ) {
+                               return c / 2 * t * t * t * t + b;
+                       }
+                       return -c / 2 * ( ( t -= 2 ) * t * t * t - 2 ) + b;
+               },
+               easeInOutExpo: function( x, t, b, c, d ) {
+                       if ( t === 0 ) {
+                               return b;
+                       }
+                       if ( t == d ) {
+                               return b + c;
+                       }
+                       if ( ( t /= d / 2 ) < 1 ) {
+                               return c / 2 * Math.pow( 2, 10 * ( t - 1 ) ) + 
b;
+                       }
+                       return c / 2 * ( -Math.pow( 2, -10 * --t ) + 2 ) + b;
+               },
+               easeInOutBack: function( x, t, b, c, d, s ) {
+                       if ( s === undefined ) {
+                               s = 1.70158;
+                       }
+                       if ( ( t /= d / 2 ) < 1 ) {
+                               return c / 2 * ( t * t * ( ( ( s *= ( 1.525 ) ) 
+ 1 ) * t - s ) ) + b;
+                       }
+                       return c / 2 * ( ( t -= 2 ) * t * ( ( ( s *= ( 1.525 ) 
) + 1 ) * t + s ) + 2 ) + b;
+               }
+       } );
+}( jQuery ) );
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/136640
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If44173652bd36655ab05ac58306e45a54af5ede2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSky
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to