1/** 2 * Modernizr Support Plugin 3 * 4 * @version 2.1.0 5 * @author Vivid Planet Software GmbH 6 * @author Artus Kolanowski 7 * @author David Deutsch 8 * @license The MIT License (MIT) 9 */ 10;(function($, Modernizr, window, document, undefined) { 11 12 var events = { 13 transition: { 14 end: { 15 WebkitTransition: 'webkitTransitionEnd', 16 MozTransition: 'transitionend', 17 OTransition: 'oTransitionEnd', 18 transition: 'transitionend' 19 } 20 }, 21 animation: { 22 end: { 23 WebkitAnimation: 'webkitAnimationEnd', 24 MozAnimation: 'animationend', 25 OAnimation: 'oAnimationEnd', 26 animation: 'animationend' 27 } 28 } 29 }; 30 31 if (!Modernizr) { 32 throw new Error('Modernizr is not loaded.'); 33 } 34 35 $.each([ 'cssanimations', 'csstransitions', 'csstransforms', 'csstransforms3d', 'prefixed' ], function(i, property) { 36 if (typeof Modernizr[property] == 'undefined') { 37 throw new Error([ 'Modernizr "', property, '" is not loaded.' ].join('')); 38 } 39 }); 40 41 if (Modernizr.csstransitions) { 42 /* jshint -W053 */ 43 $.support.transition = new String(Modernizr.prefixed('transition')) 44 $.support.transition.end = events.transition.end[ $.support.transition ]; 45 // fix transitionend support detection, which does not work properly for older Android versions, 46 // as it does not give the prefixed event name. here we use Modernizr to ensure the correct event. 47 // see: 48 // https://github.com/Modernizr/Modernizr/issues/897 49 // https://github.com/niksy/modernizr-detects/commit/05d148fc4f3813b1412c836325a9ca78c7a63f4d 50 if (/Android 4\.[123]/.test(navigator.userAgent)) { 51 $.support.transition.end = 'webkitTransitionEnd'; 52 } 53 } 54 55 if (Modernizr.cssanimations) { 56 /* jshint -W053 */ 57 $.support.animation = new String(Modernizr.prefixed('animation')) 58 $.support.animation.end = events.animation.end[ $.support.animation ]; 59 } 60 61 if (Modernizr.csstransforms) { 62 /* jshint -W053 */ 63 $.support.transform = new String(Modernizr.prefixed('transform')); 64 $.support.transform3d = Modernizr.csstransforms3d; 65 } 66})(window.Zepto || window.jQuery, window.Modernizr, window, document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.