32 lines
89 KiB
JavaScript
32 lines
89 KiB
JavaScript
![]() |
/**
|
||
|
* App.js v3.0.5
|
||
|
* Instant mobile web app creation
|
||
|
* Copyright (c) 2012 Kik Interactive, http://kik.com
|
||
|
* Released under the MIT license
|
||
|
*
|
||
|
* iScroll v4.1.6
|
||
|
* Copyright (c) 2011 Matteo Spinelli, http://cubiq.org
|
||
|
* Released under the MIT license
|
||
|
*
|
||
|
* Permission is hereby granted, free of charge, to any person
|
||
|
* obtaining a copy of this software and associated documentation
|
||
|
* files (the "Software"), to deal in the Software without
|
||
|
* restriction, including without limitation the rights to use,
|
||
|
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
|
* copies of the Software, and to permit persons to whom the
|
||
|
* Software is furnished to do so, subject to the following
|
||
|
* conditions:
|
||
|
*
|
||
|
* The above copyright notice and this permission notice shall be
|
||
|
* included in all copies or substantial portions of the Software.
|
||
|
*
|
||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||
|
*/
|
||
|
var Swapper=function(f,d){function e(h,i,c,b){e._swapper(h,i,c,b)}if(f&&f.fn){f.extend(f.fn,{swapper:function(g,c,b){g=f(g)[0];this.forEach(function(h){e._swapper(h,g,c,b)});return this}})}if(d&&d.fn){d.fn.swapper=function(g,c,b){g=d(g)[0];this.each(function(){e._swapper(this,g,c,b)});return this}}return e}(window.Zepto,window.jQuery);Swapper._os=function(i,k){var l,h,g;if(g=/\bCPU.*OS (\d+(_\d+)?)/i.exec(i)){l="ios";h=g[1].replace("_",".")}else{if(g=/\bAndroid (\d+(\.\d+)?)/.exec(i)){l="android";h=g[1]}}var j={name:l,version:h&&k(h)};j[l]=true;return j}(navigator.userAgent,parseFloat);Swapper._isNode=function(d,c){return function(b){if(!b){return false}try{return(b instanceof d)||(b instanceof c)}catch(e){}if(typeof b!=="object"){return false}if(typeof b.nodeType!=="number"){return false}if(typeof b.nodeName!=="string"){return false}return true}}(Node,HTMLElement);Swapper._isInDOM=function(b){return function(e,d){if(!d&&!b(e)){throw TypeError("element must be a DOM node, got "+e)}while(e=e.parentNode){if(e===document){return true}}return false}}(Swapper._isNode);Swapper._insertBefore=function(){return function(d,c){c.parentNode.insertBefore(d,c)}}();Swapper._insertAfter=function(){return function(e,f){var d=f.parentNode;if(d.lastchild===f){d.appendChild(e)}else{d.insertBefore(e,f.nextSibling)}}}();Swapper._removeNode=function(){return function(b){if(b.parentNode){b.parentNode.removeChild(b)}}}();Swapper._setTransform=function(){return function(c,d){c.style["-webkit-transform"]=d;c.style["-moz-transform"]=d;c.style["-ms-transform"]=d;c.style["-o-transform"]=d;c.style.transform=d}}();Swapper._setTransition=function(){return function(d,c){if(c){d.style["-webkit-transition"]="-webkit-"+c;d.style["-moz-transition"]="-moz-"+c;d.style["-ms-transition"]="-ms-"+c;d.style["-o-transition"]="-o-"+c;d.style.transition=c}else{d.style["-webkit-transition"]="";d.style["-moz-transition"]="";d.style["-ms-transition"]="";d.style["-o-transition"]="";d.style.transition=""}}}();Swapper._getStyles=function(b){return function(g,f){var e;if(f){e=g.style}else{e=b.defaultView.getComputedStyle(g,null)}return{"-webkit-transition":e["-webkit-transition"],"-moz-transition":e["-moz-transition"],"-ms-transition":e["-ms-transition"],"-o-transition":e["-o-transition"],transition:e.transition,display:e.display,opacity:e.opacity,top:e.top,left:e.left,height:e.height,width:e.width,position:e.position}}}(document);Swapper._easings={linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out","step-start":"step-start","step-end":"step-end"};Swapper._transitions={fade:[{fade:true},{fade:true}],"fade-on":[{fade:true},{}],"fade-off":[{},{fade:true},true],"scale-in":[{transform:"scale(0.01)"},{}],"scale-out":[{},{transform:"scale(0.01)"},true],"rotate-left":[{transform:"rotateY(-180deg) perspective(360px)",fade:true},{transform:"rotateY( 180deg) perspective(360px)",fade:true}],"rotate-right":[{transform:"rotateY( 180deg) perspective(360px)",fade:true},{transform:"rotateY(-180deg) perspective(360px)",fade:true}],"cube-left":[{transform:"translate3d( 50%,0,0) rotateY(-90deg) perspective(360px)"},{transform:"translate3d(-50%,0,0) rotateY( 90deg) perspective(360px)"}],"cube-right":[{transform:"translate3d(-50%,0,0) rotateY( 90deg) perspective(360px)"},{transform:"translate3d( 50%,0,0) rotateY(-90deg) perspective(360px)"}],"swap-left":[{transform:"translate3d( 65%,0,0) rotateY( 90deg) perspective(360px)"},{transform:"translate3d(-65%,0,0) rotateY(-90deg) perspective(360px)"}],"swap-right":[{transform:"translate3d(-65%,0,0) rotateY(-90deg) perspective(360px)"},{transform:"translate3d( 65%,0,0) rotateY( 90deg) perspective(360px)"}],"explode-in":[{fade:true,transform:"scale(1.25)"},{}],"explode-out":[{},{fade:true,transform:"scale(1.25)"},true],"implode-in":[{},{fade:true,transform:"scale(0.60)"},true],"implode-out":[{fade:true,transform:"scale(0.80)"},{}],"slide-left":[{transform:"translate3d( 100%,0,0)"},{transform:"translate3d(-100%,0,0)"}],"slide-right":[{transform:"translate3d(-100%,0,0)"},{transform:"translate3d( 100%,0,0)"}],"
|