web2app-spa
Version:
This template is primarily designed to easily convert HTML pages and URLs into a Capacitor/Cordova based iOS/Android app that can be used as Single-page application (SPA).
1 lines • 2.17 kB
JavaScript
;const secondView={default:{},resetDefault:function(){secondView.default.width="container-width",secondView.default.height="container-height",secondView.default.backgroundColor="white",secondView.default.scrollY=1,secondView.default.showWithMotion=1}};secondView.resetDefault(),secondView.onCloseFunc=function(){},secondView.create=function(e={}){secondView.box=createBox();for(let o in secondView.default)secondView.default[o]=null!=e[o]?e[o]:secondView.default[o];"container-width"==secondView.default.width&&(secondView.default.width=getDefaultContainerBox().width),"container-height"==secondView.default.height&&(secondView.default.height=getDefaultContainerBox().height),that.width=secondView.default.width,that.height=secondView.default.height,secondView.box.visible=0,secondView.box.setMotion("left 0.2s, opacity 0.2s"),that.left=0,that.top=0,secondView.clear()},secondView.getContainerBox=function(){return secondView.box},secondView.close=function(){secondView.setVisible(0,(function(){secondView.clear(),secondView.onCloseFunc(),secondView.onCloseFunc=function(){}}))},secondView.clear=function(){secondView.box.html="",secondView.box.color=secondView.default.backgroundColor,secondView.box.border=0,secondView.box.scrollX=0,secondView.box.scrollY=secondView.default.scrollY},secondView.setVisible=function(e,o=function(){}){e!=secondView.box.visibleValue&&(secondView.box.visibleValue=e,secondView.default.showWithMotion?e?(secondView.box.dontMotion(),secondView.box.visible=1,secondView.tempLeft=secondView.box.left,secondView.box.left=secondView.default.width,secondView.box.withMotion((function(e){secondView.box.left=secondView.tempLeft})),setTimeout((function(){o()}),250)):(secondView.box.dontMotion(),secondView.box.left=secondView.tempLeft,secondView.box.withMotion((function(e){secondView.box.left=secondView.default.width})),setTimeout((function(){secondView.box.visible=secondView.box.visibleValue,secondView.box.left=secondView.tempLeft,o()}),250)):(e&&(secondView.box.dontMotion(),secondView.box.left=secondView.tempLeft||secondView.box.left),secondView.box.visible=e,o()))},secondView.onClose=function(e){secondView.onCloseFunc=e};