sinzmise-cetastories 2.0.0-1731066602594 → 2.0.0-1731114112124
Sign up to get free protection for your applications and to get access to all the features.
- package/404/index.html +4033 -1
- package/about/index.html +4041 -1
- package/album/index.html +4050 -1
- package/archives/2021/12/index.html +3917 -1
- package/archives/2021/index.html +3917 -1
- package/archives/2022/12/index.html +3917 -1
- package/archives/2022/index.html +3917 -1
- package/archives/2023/01/index.html +4072 -1
- package/archives/2023/02/index.html +3917 -1
- package/archives/2023/03/index.html +4063 -1
- package/archives/2023/04/index.html +3992 -1
- package/archives/2023/07/index.html +4217 -1
- package/archives/2023/08/index.html +4067 -1
- package/archives/2023/09/index.html +3917 -1
- package/archives/2023/10/index.html +3917 -1
- package/archives/2023/11/index.html +3917 -1
- package/archives/2023/12/index.html +3918 -1
- package/archives/2023/index.html +4591 -1
- package/archives/2023/page/2/index.html +4572 -1
- package/archives/2023/page/3/index.html +3930 -1
- package/archives/2024/01/index.html +4142 -1
- package/archives/2024/02/index.html +3922 -1
- package/archives/2024/03/index.html +3916 -1
- package/archives/2024/04/index.html +3997 -1
- package/archives/2024/05/index.html +4065 -1
- package/archives/2024/06/index.html +3917 -1
- package/archives/2024/07/index.html +3917 -1
- package/archives/2024/08/index.html +3992 -1
- package/archives/2024/09/index.html +3917 -1
- package/archives/2024/10/index.html +3984 -1
- package/archives/2024/index.html +4576 -1
- package/archives/2024/page/2/index.html +4433 -1
- package/archives/index.html +4560 -1
- package/archives/page/2/index.html +4560 -1
- package/archives/page/3/index.html +4560 -1
- package/archives/page/4/index.html +4560 -1
- package/archives/page/5/index.html +4560 -1
- package/assets/algolia/algoliasearch.js +7182 -3
- package/assets/algolia/algoliasearchLite.js +4445 -3
- package/atom.xml +31 -31
- package/bbs/bbs.html +4012 -1
- package/bbs/bbs.js +12 -2
- package/bbs/index.html +4031 -1
- package/categories/index.html +4050 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +4570 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +4485 -1
- package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +3920 -1
- package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +4148 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +4610 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +4148 -1
- package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +4072 -1
- package/charts/index.html +4039 -1
- package/comments/index.html +4052 -1
- package/content.json +1 -0
- package/css/custom2.css +3 -2
- package/css/first.css +1868 -2
- package/css/pace/big-counter.css +39 -2
- package/css/pace/corner-indicator.css +72 -2
- package/css/pace/flash.css +76 -2
- package/css/pace/mac-osx.css +86 -2
- package/css/pace/pace.css +50 -2
- package/css/plane.css +59 -2
- package/css/style.css +8585 -2
- package/css/tags.css +3516 -2
- package/essay/index.html +4050 -1
- package/fcircle/index.html +4075 -1
- package/games +61 -19
- package/index.html +4717 -1
- package/js/app.js +1341 -2
- package/js/autoload.js +62 -2
- package/js/ceta/fancybox.css +2 -2
- package/js/ceta/fancybox.umd.js +2 -2
- package/js/ceta/iconfontInkss.js +1 -2
- package/js/ceta/message.css +6 -2
- package/js/ceta/message.js +6 -2
- package/js/clock.js +1 -2
- package/js/kslink.js +38 -2
- package/js/newyear.js +76 -2
- package/js/plane.js +2200 -2
- package/js/plugins/aplayer.js +186 -2
- package/js/plugins/parallax.js +191 -2
- package/js/plugins/rightMenus.js +623 -2
- package/js/plugins/tags/contributors.js +92 -2
- package/js/plugins/tags/friends.js +93 -2
- package/js/plugins/tags/sites.js +96 -2
- package/js/search/algolia.js +239 -2
- package/js/search/hexo.js +195 -2
- package/js/search/meilisearch.js +220 -2
- package/js/txmap.js +248 -2
- package/link/index.html +6180 -1
- package/load.html +294 -1
- package/music/index.html +4033 -1
- package/package.json +1 -1
- package/page/2/index.html +4578 -1
- package/page/3/index.html +4575 -1
- package/page/4/index.html +4572 -1
- package/page/5/index.html +3924 -1
- package/posts/10021/index.html +4130 -5
- package/posts/10045/index.html +4224 -1
- package/posts/10733/index.html +4125 -1
- package/posts/10996/index.html +4127 -5
- package/posts/12779/index.html +4134 -1
- package/posts/13624/index.html +4179 -1
- package/posts/15688/index.html +4133 -1
- package/posts/15748/index.html +4121 -5
- package/posts/15799/index.html +4130 -1
- package/posts/15842/index.html +4121 -5
- package/posts/16107/index.html +4111 -1
- package/posts/18063/index.html +4124 -1
- package/posts/20412/index.html +4134 -1
- package/posts/21375/index.html +4124 -1
- package/posts/22945/index.html +4169 -4
- package/posts/23021/index.html +4104 -1
- package/posts/27531/index.html +4121 -5
- package/posts/28536/index.html +4116 -1
- package/posts/28733/index.html +4168 -1
- package/posts/29196/index.html +4106 -1
- package/posts/38917/index.html +4144 -1
- package/posts/38964/index.html +4208 -1
- package/posts/42487/index.html +4135 -1
- package/posts/42580/index.html +4128 -1
- package/posts/45875/index.html +4118 -1
- package/posts/46640/index.html +4147 -1
- package/posts/48762/index.html +4109 -1
- package/posts/50710/index.html +4114 -1
- package/posts/52677/index.html +4125 -1
- package/posts/53662/index.html +4123 -1
- package/posts/54386/index.html +4116 -1
- package/posts/54481/index.html +4133 -1
- package/posts/54787/index.html +4124 -5
- package/posts/56467/index.html +4121 -1
- package/posts/57692/index.html +4143 -1
- package/posts/58203/index.html +4116 -1
- package/posts/61417/index.html +4117 -1
- package/posts/61712/index.html +4113 -1
- package/posts/646/index.html +4106 -1
- package/posts/64856/index.html +4120 -1
- package/posts/64935/index.html +4120 -1
- package/search.xml +78 -78
- package/seas/index.html +4050 -1
- package/sw.js +798 -2
- package/tags/Flash/347/233/270/345/205/263/index.html +3924 -1
- package/tags/Steam/346/270/270/346/210/217/index.html +3924 -1
- package/tags/Windows/350/275/257/344/273/266/index.html +3997 -1
- package/tags/index.html +4033 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +4570 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +4485 -1
- package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +4073 -1
- package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +3924 -1
- package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +3925 -1
- package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +3920 -1
- package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +4148 -1
- package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +3924 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +4610 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +4148 -1
- package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +4224 -1
- package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +4075 -1
- package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +4072 -1
- package/update/index.html +4112 -1
- package/weichuncai/css/style.css +25 -2
- package/weichuncai/js/common.js +449 -2
- package/weichuncai/js/jquery.js +139 -2
- package/weichuncai/wcc-config.js +17 -2
- package/maps/assets/algolia/algoliasearch.js.map +0 -1
- package/maps/assets/algolia/algoliasearchLite.js.map +0 -1
- package/maps/bbs/bbs.js.map +0 -1
- package/maps/css/custom2.css.map +0 -1
- package/maps/css/first.css.map +0 -1
- package/maps/css/pace/big-counter.css.map +0 -1
- package/maps/css/pace/corner-indicator.css.map +0 -1
- package/maps/css/pace/flash.css.map +0 -1
- package/maps/css/pace/mac-osx.css.map +0 -1
- package/maps/css/pace/pace.css.map +0 -1
- package/maps/css/plane.css.map +0 -1
- package/maps/css/style.css.map +0 -1
- package/maps/css/tags.css.map +0 -1
- package/maps/js/app.js.map +0 -1
- package/maps/js/autoload.js.map +0 -1
- package/maps/js/ceta/fancybox.css.map +0 -1
- package/maps/js/ceta/fancybox.umd.js.map +0 -1
- package/maps/js/ceta/iconfontInkss.js.map +0 -1
- package/maps/js/ceta/message.css.map +0 -1
- package/maps/js/ceta/message.js.map +0 -1
- package/maps/js/clock.js.map +0 -1
- package/maps/js/kslink.js.map +0 -1
- package/maps/js/newyear.js.map +0 -1
- package/maps/js/plane.js.map +0 -1
- package/maps/js/plugins/aplayer.js.map +0 -1
- package/maps/js/plugins/parallax.js.map +0 -1
- package/maps/js/plugins/rightMenus.js.map +0 -1
- package/maps/js/plugins/tags/contributors.js.map +0 -1
- package/maps/js/plugins/tags/friends.js.map +0 -1
- package/maps/js/plugins/tags/sites.js.map +0 -1
- package/maps/js/search/algolia.js.map +0 -1
- package/maps/js/search/hexo.js.map +0 -1
- package/maps/js/search/meilisearch.js.map +0 -1
- package/maps/js/txmap.js.map +0 -1
- package/maps/sw.js.map +0 -1
- package/maps/weichuncai/css/style.css.map +0 -1
- package/maps/weichuncai/js/common.js.map +0 -1
- package/maps/weichuncai/js/jquery.js.map +0 -1
- package/maps/weichuncai/wcc-config.js.map +0 -1
package/maps/js/plane.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"../../js/plane.js","names":["window","JSONP","head","query","key","counter","this","get","url","params","callback","hasOwnProperty","encodeURIComponent","jsonp","data","e","script","document","createElement","done","src","async","onload","onreadystatechange","readyState","parentNode","removeChild","getElementsByTagName","body","appendChild","load","CORS","request","calledByExtension","_callbacks","_callbackId","postMessage","JSON","stringify","from","type","xhr","XMLHttpRequest","parse","responseText","open","withCredentials","setRequestHeader","send","getElementById","getGlobalNamespace","INSTALL_SCOPE","addEventListener","messageData","sanityCheck","message","payload","requestId","KICKASSGAME","destroy","Class","methods","ret","$prototyping","initialize","apply","arguments","Extends","parent","prototype","exports","Vector","x","y","cp","mul","factor","mulNew","div","divNew","add","vec","addNew","sub","subNew","rotate","angle","Math","cos","sin","rotateNew","setAngle","l","len","setAngleNew","setLength","length","setLengthNew","normalize","normalizeNew","atan2","collidesWith","rect","width","height","sqrt","is","test","dot","v2","inTriangle","a","b","c","v0","v1","p","dot00","dot01","dot02","dot11","dot12","invDenom","u","v","distanceFrom","pow","toString","Rect","w","h","pos","size","hasPoint","point","getLeft","getRight","getTop","getBottom","setLeft","left","setTop","top","Fx","listeners","tweens","running","addListener","listener","push","props","duration","transition","Tween","Linear","repeats","start","end","update","time","now","tweenStart","tween","tdelta","startTime","tweenFinished","t","delta","changes","i","fire","values","set","call","Quadratic","Quintic","Shake","GameGlobals","FPS","useAnimationFrame","boids","flockRadius","path","Array","slice","join","hasCanvas","getContext","bulletColor","Date","getTime","bind","bound","func","each","arr","bindObject","forEach","addEvent","obj","fn","attachEvent","event","removeEvent","removeEventListener","detachEvent","stopEvent","stopPropogation","preventDefault","returnValue","elementIsContainedIn","element1","element2","element","contains","compareDocumentPosition","code","name","table","String","fromCharCode","random","min","max","floor","getRect","getBoundingClientRect","sx","pageXOffset","sy","pageYOffset","offsetWidth","offsetHeight","el","offsetLeft","offsetTop","offsetParent","getCompatElement","doc","compatMode","documentElement","getScrollSize","clientWidth","clientHeight","scrollWidth","scrollHeight","getStyle","prop","style","currentStyle","defaultView","getComputedStyle","getPropertyValue","setStyles","val","hasClass","ele","cls","className","match","RegExp","addClass","removeClass","reg","replace","cloneElement","cloneNode","newElement","tag","indexOf","searchElement","TypeError","Object","n","Number","abs","k","requestAnimFrame","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","setTimeout","delay","d","KickAss","options","mySite","players","elements","weaponClass","Weapons","cannonClass","scrollPos","scrollSize","windowSize","updateWindowInfo","bulletManager","BulletManager","updateEnemyIndex","explosionManager","ExplosionManager","ui","UIManager","bombManager","BombManager","menuManager","MenuManager","create","StatisticsManager","statisticsManager","sessionManager","SessionManager","lastUpdate","keyMap","keydownEvent","keydown","keyupEvent","keyup","multiplier","isCampaign","audioManager","explosion","AudioManager","shot","KickAssStyle","begin","addPlayer","isPlaying","loopTimer","setInterval","loop","keyCode","currentTime","player","ship","Ships","Standard","KICKASSSHIP","points","getShipConfig","Player","setShip","addExplosion","registerElement","Error","unregisterElement","splice","isKickAssElement","isKeyPressed","isIEQuirks","ActiveXObject","isVisible","getHeight","scrollLeft","scrollTop","hideAll","visibility","showAll","updateShips","isInitial","showMessage","changeWeapon","weapon","toUpperCase","setCannons","changeWeaponById","id","flyOutPlayers","flyTo","isBound","flyInPlayers","newRank","rank","fireBomb","blow","clearInterval","location","reload","IS_CLOUDFLARE_GAME","isMySite","KICKASS_SITE_KEY","shouldShowAd","shouldShowMenu","shouldShowHowToImage","game","startedPlaying","elementsDestroyed","shotsFired","distanceFlownInPixels","totalPointsThisSession","usedThrusters","increaseDistanceWithPixels","px","increasePointsGainedWithPoints","addShotFired","play","addElementsDestroyed","syncWithServer","fragment","sendMessageToMenu","MySite","site_key","embed","mySiteData","install","getShipId","settings","ship_config","getShareURL","share_url","Menu","generate","container","shipId","KICKASSSHIPID","KICKASSURL","href","isSocketReady","socketIframe","frameborder","menuOrigin","onMessage","origin","split","shift","charAt","onGameReady","console","log","socketPostMessage","contentWindow","sendMessage","lastMessage","messageTypeChangeShip","pieces","ship_id","is_initial","focus","hideMenu","messageTypeChangeWeapon","weaponId","messageTypeSetMultiplier","mod","parseInt","isNaN","messageTypeNewRank","messageTypePlayerMessage","iframe","numPoints","KICKASS_INLINE_CSS","includeCSS","generateDefaults","addWeapon","hideBombMenu","bottom","display","getAppContainerElement","innerHTML","getShareHTML","pointsTab","pointsTabWrapper","escToQuit","howToImage","weaponsMenu","weaponsList","bombLink","all","menu","toggleMenu","toggleWeaponsMenu","navigateTo","page","dontShowMenu","showMenu","showWeaponsMenu","hideWeaponsMenu","last","showBombMenu","addPoints","killed","addPointsBubbleAt","file","link","rel","li","backgroundImage","UNIQID","pointBubbles","messages","fx","value","bubble","opacity","staytime","styles","position","font","fontWeight","color","textShadow","zIndex","html","marginLeft","background","padding","textAlign","borderRadius","to","getLowestBubbleY","kickassto","formats","channels","supportsAudio","numChannels","prepareElement","buildAudioElement","format","TYPES","ogg","mp3","audio","source","self","audioEnded","target","channel","thrusters","s","cannons","PLAYERIDS","vel","acc","dir","currentRotation","isBroken","lineOffsets","deadTime","friction","terminalVelocity","lastPos","verts","vert","addThrusters","addCannons","getSizeFromVertsAndObjects","bounds","calculateBounds","sheet","Sheet","forceRedraw","cannon","newCannons","newCannon","thruster","Thruster","WeaponMap","m","PI","clear","setPosition","drawBrokenPlayer","randomPos","rotateLeft","rotateRight","stopRotate","activateThrusters","stopThrusters","isShooting","shootPressed","shootReleased","frictionedAcc","posDelta","showFlames","setIsShown","checkBounds","drawTo","drawPlayer","rightBound","bottomBound","scrollTo","inRect","hit","by","largestDistance","p1","p2","p3","p4","getTimeforTween","isShown","flameY","flames","r","lastFrameUpdate","generateFlames","drawFlames","redWidth","redIncrease","yellowWidth","yellowIncrease","halfRed","halfYellow","py","bombShowDelay","nextBomb","isReady","blowStuffUp","index","enemyIndex","center","MegaParticleExplosion","ELEMENTSTHATARENOTTOBEINCLUDED","ELEMENTSIZETHRESHOLD","lastBlink","blinkActive","updateDelay","nextUpdate","blink","endBlink","outline","KICKASSOLDBORDER","isDestroyable","ignoreSize","shouldIgnoreElement","child","childNodes","nodeType","tagName","isDestroyableFromCollision","bullets","bullet","weHaveWon","explosions","bornAt","ttl","forElement","explosionClass","ParticleExplosion","Cannon","checkCollisions","getExplosionClass","checkCollision","isShot","createBullet","bulletClass","getABulletPos","getABulletDir","manager","initCanvas","LaserCannon","lasers","SplitExplosion","removeOld","laser","outOfBounds","lastFired","LaserBullet","BallCannon","addBullet","Bullet","drawBullet","draw","elementFromPoint","lastDrawPos","laserImage","drawLaser","Explosion","particleVel","particles","generateParticles","particle","drawExplosion","j","right","generationDelay","generationTimes","nextGenerate","createClones","lT","rT","transform","coords","leftContainer","createContainer","rightContainer","margin","overflow","SheetCanvas","canvas","kickass","ctx","updateCanvas","tracePoly","save","translate","beginPath","moveTo","lineTo","restore","drawLine","xFrom","yFrom","xTo","yTo","closePath","stroke","drawCircle","radius","arc","fill","drawRect","fillRect","drawImageFull","image","drawImage","setFillColor","fillStyle","setStrokeColor","strokeStyle","setLineWidth","lineWidth","fillPath","strokePath","clearRect","drawer","lastVert","o","drawFace","face","transformToSheetCoordinates","namespace","initKickAss","ok","KICKASS_CONTAINER_ELEMENT","LAZYLOAD_KICKASS","startBrowserBlaster"],"sources":["js/plane.js"],"mappings":"CAGA,SAAWA,QACP,IAAIC,MAAS,WACT,IAAiBC,EAAMC,EAAOC,EAA1BC,EAAU,EAAqBL,EAASM,KA4C5C,MAAO,CAACC,IArBR,SAAeC,EAAKC,EAAQC,GAGxB,IAAKN,KAFLD,EAAQ,IACRM,EAASA,GAAU,CAAC,EAEZA,EAAOE,eAAeP,KACtBD,GAASS,mBAAmBR,GAAO,IAAMQ,mBAAmBH,EAAOL,IAAQ,KAGnF,IAAIS,EAAQ,UAAYR,EAUxB,OATAL,EAAOa,GAAS,SAAUC,GACtBJ,EAASI,GACT,WACWd,EAAOa,EAClB,CAAE,MAAOE,GACT,CACAf,EAAOa,GAAS,IACpB,EArCJ,SAAcL,GACV,IAAIQ,EAASC,SAASC,cAAc,UAAWC,GAAO,EACtDH,EAAOI,IAAMZ,EACbQ,EAAOK,OAAQ,EACfL,EAAOM,OAASN,EAAOO,mBAAqB,WACnCJ,GAAUb,KAAKkB,YAAkC,WAApBlB,KAAKkB,YAA+C,aAApBlB,KAAKkB,aACnEL,GAAO,EACPH,EAAOM,OAASN,EAAOO,mBAAqB,KACxCP,GAAUA,EAAOS,YACjBT,EAAOS,WAAWC,YAAYV,GAG1C,EACKd,IACDA,EAAOe,SAASU,qBAAqB,QAAQ,MAEzCzB,EAAOe,SAASW,MAExB1B,EAAK2B,YAAYb,EACrB,CAmBIc,CAAKtB,EAAML,EAAQ,YAAcU,GAC1BA,CACX,EAGJ,CA9CY,GA+CRkB,KAAO,CACPC,QAAS,SAAUxB,EAAKC,EAAQC,GAC5B,GAAIJ,KAAK2B,oBAQL,OAPA3B,KAAK4B,WAAW5B,KAAK6B,eAAiBzB,OACtCV,OAAOoC,YAAYC,KAAKC,UAAU,CAC9BC,KAA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3hB,YAAYye,WAAY,EAAG,EACrD,EAAGiE,4BAA6B,SAAU1oB,GAEtC,OADUA,EAAIP,KAAKS,IAAI,IAAIZ,OAAOjE,KAAKgG,KAAK8B,KAAK7B,MAAQ,EAAGjG,KAAKgG,KAAK8B,KAAK5B,OAAS,GAExF,EAAG7C,QAAS,WACRrD,KAAKgtB,OAAO3pB,SAChB,IAEAiqB,UAAY1qB,qBAEZ2qB,YAAc,WAEd,GAAKD,UAAUlqB,YAeXkqB,UAAUlqB,YAAY8Q,iBAdtB,GAAIoZ,UAAU9V,iBAAkB,CAC5B,IAAI9F,EAAS,IAAIkH,OAAO0U,UAAU9V,kBAClC9F,EAAOlQ,MAAK,SAAUgsB,GAClBF,UAAUlqB,YAAcuH,YAAYkgB,QAAU,IAAIrZ,QAAQ,CACtDE,SAAQ8b,GAAK9b,IAGjB4b,UAAUlqB,YAAY6Q,OAC1B,GACJ,MACIqZ,UAAUlqB,YAAcuH,YAAYkgB,QAAU,IAAIrZ,QAClD8b,UAAUlqB,YAAY6Q,OAKlC,EAQA,SAASmI,yBACL,OAAIkR,UAAUG,0BACH9sB,SAASgC,eAAe2qB,UAAUG,2BAElC9sB,SAASW,IAExB,CAZIgsB,UAAUI,iBACVhuB,OAAOiuB,oBAAsBJ,YAE7BA,aAUP,EAppED,CAopEqB,oBAAXvpB,QAAyBA,QAAUtE","ignoreList":[],"sourcesContent":["/*\n Copyright (c) <2011, 2012> Rootof Creations HB, rootof.com, kickassapp.com\n*/\n(function (window) {\n var JSONP = (function () {\n var counter = 0, head, query, key, window = this;\n\n function load(url) {\n var script = document.createElement('script'), done = false;\n script.src = url;\n script.async = true;\n script.onload = script.onreadystatechange = function () {\n if (!done && (!this.readyState || this.readyState === \"loaded\" || this.readyState === \"complete\")) {\n done = true;\n script.onload = script.onreadystatechange = null;\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n }\n };\n if (!head) {\n head = document.getElementsByTagName('head')[0];\n if (!head)\n head = document.body;\n }\n head.appendChild(script);\n }\n\n function jsonp(url, params, callback) {\n query = \"?\";\n params = params || {};\n for (key in params) {\n if (params.hasOwnProperty(key)) {\n query += encodeURIComponent(key) + \"=\" + encodeURIComponent(params[key]) + \"&\";\n }\n }\n var jsonp = \"json\" + (++counter);\n window[jsonp] = function (data) {\n callback(data);\n try {\n delete window[jsonp];\n } catch (e) {\n }\n window[jsonp] = null;\n };\n load(url + query + \"callback=\" + jsonp);\n return jsonp;\n }\n\n return {get: jsonp};\n }());\n var CORS = {\n request: function (url, params, callback) {\n if (this.calledByExtension()) {\n this._callbacks[this._callbackId++] = callback;\n window.postMessage(JSON.stringify({\n from: \"kickassapp-page\",\n url: url,\n type: \"callApi\",\n params: params\n }), \"*\");\n return;\n }\n params = params || {};\n var query = \"?\";\n for (key in params) {\n if (params.hasOwnProperty(key)) {\n query += encodeURIComponent(key) + \"=\" + encodeURIComponent(params[key]) + \"&\";\n }\n }\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState == 4) {\n callback(JSON.parse(xhr.responseText));\n }\n }\n xhr.open(\"GET\", url + query);\n xhr.withCredentials = true;\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n xhr.send();\n }, calledByExtension: function () {\n return !!document.getElementById(\"kickass-has-been-initialized-yes-yes-yes\");\n }, _callbacks: {}, _callbackId: 0\n }\n if (CORS.calledByExtension()) {\n window.addEventListener(\"message\", function (e) {\n var messageData;\n try {\n messageData = JSON.parse(e.data);\n } catch (e) {\n return;\n }\n if (messageData.from === \"kickassapp-extension\" && messageData.sanityCheck === \"kickassapp-extension-version1\") {\n var message = messageData.payload;\n if (message.type === \"response\") {\n CORS._callbacks[message.requestId](message.body);\n delete CORS._callbacks[message.requestId];\n } else if (message.type === \"destroy\") {\n window.KICKASSGAME.destroy();\n }\n }\n }, false);\n }\n\n function getGlobalNamespace() {\n return window && window.INSTALL_SCOPE ? window.INSTALL_SCOPE : window;\n }\n\n var Class = function (methods) {\n var ret = function () {\n if (ret.$prototyping) return this;\n if (typeof this.initialize == 'function')\n return this.initialize.apply(this, arguments);\n };\n if (methods.Extends) {\n ret.parent = methods.Extends;\n methods.Extends.$prototyping = true;\n ret.prototype = new methods.Extends;\n methods.Extends.$prototyping = false;\n }\n for (var key in methods) if (methods.hasOwnProperty(key))\n ret.prototype[key] = methods[key];\n return ret;\n };\n if (typeof exports != 'undefined') exports.Class = Class;\n var Vector = new Class({\n initialize: function (x, y) {\n if (typeof x == 'object') {\n this.x = x.x;\n this.y = x.y;\n } else {\n this.x = x;\n this.y = y;\n }\n }, cp: function () {\n return new Vector(this.x, this.y);\n }, mul: function (factor) {\n this.x *= factor;\n this.y *= factor;\n return this;\n }, mulNew: function (factor) {\n return new Vector(this.x * factor, this.y * factor);\n }, div: function (factor) {\n this.x /= factor;\n this.y /= factor;\n return this;\n }, divNew: function (factor) {\n return new Vector(this.x / factor, this.y / factor);\n }, add: function (vec) {\n this.x += vec.x;\n this.y += vec.y;\n return this;\n }, addNew: function (vec) {\n return new Vector(this.x + vec.x, this.y + vec.y);\n }, sub: function (vec) {\n this.x -= vec.x;\n this.y -= vec.y;\n return this;\n }, subNew: function (vec) {\n return new Vector(this.x - vec.x, this.y - vec.y);\n }, rotate: function (angle) {\n var x = this.x, y = this.y;\n this.x = x * Math.cos(angle) - Math.sin(angle) * y;\n this.y = x * Math.sin(angle) + Math.cos(angle) * y;\n return this;\n }, rotateNew: function (angle) {\n return this.cp().rotate(angle);\n }, setAngle: function (angle) {\n var l = this.len();\n this.x = Math.cos(angle) * l;\n this.y = Math.sin(angle) * l;\n return this;\n }, setAngleNew: function (angle) {\n return this.cp().setAngle(angle);\n }, setLength: function (length) {\n var l = this.len();\n if (l) this.mul(length / l); else this.x = this.y = length;\n return this;\n }, setLengthNew: function (length) {\n return this.cp().setLength(length);\n }, normalize: function () {\n var l = this.len();\n if (l == 0)\n return this;\n this.x /= l;\n this.y /= l;\n return this;\n }, normalizeNew: function () {\n return this.cp().normalize();\n }, angle: function () {\n return Math.atan2(this.y, this.x);\n }, collidesWith: function (rect) {\n return this.x > rect.x && this.y > rect.y && this.x < rect.x + rect.width && this.y < rect.y + rect.height;\n }, len: function () {\n var l = Math.sqrt(this.x * this.x + this.y * this.y);\n if (l < 0.005 && l > -0.005) return 0;\n return l;\n }, is: function (test) {\n return typeof test == 'object' && this.x == test.x && this.y == test.y;\n }, dot: function (v2) {\n return this.x * v2.x + this.y * v2.y;\n }, inTriangle: function (a, b, c) {\n var v0 = c.subNew(a);\n var v1 = b.subNew(a);\n var v2 = p.subNew(a);\n var dot00 = v0.dot(v0);\n var dot01 = v0.dot(v1);\n var dot02 = v0.dot(v2);\n var dot11 = v1.dot(v1);\n var dot12 = v1.dot(v2);\n var invDenom = 1 / (dot00 * dot11 - dot01 * dot01);\n var u = (dot11 * dot02 - dot01 * dot12) * invDenom;\n var v = (dot00 * dot12 - dot01 * dot02) * invDenom;\n return (u > 0) && (v > 0) && (u + v < 1);\n }, distanceFrom: function (vec) {\n return Math.sqrt(Math.pow((this.x - vec.x), 2), Math.pow(this.y - vec.y, 2));\n }, toString: function () {\n return '[Vector(' + this.x + ', ' + this.y + ') angle: ' + this.angle() + ', length: ' + this.len() + ']';\n }\n });\n if (typeof exports != 'undefined') exports.Vector = Vector;\n var Rect = new Class({\n initialize: function (x, y, w, h) {\n this.pos = new Vector(x, y);\n this.size = {width: w, height: h};\n }, hasPoint: function (point) {\n return point.x > this.getLeft() && point.x < this.getRight() && point.y > this.getTop() && point.y < this.getBottom();\n }, setLeft: function (left) {\n this.pos.x = left + this.size.width / 2;\n }, setTop: function (top) {\n this.pos.y = top + this.size.height / 2;\n }, getLeft: function () {\n return this.pos.x - this.size.width / 2;\n }, getTop: function () {\n return this.pos.y - this.size.height / 2;\n }, getRight: function () {\n return this.pos.x + this.size.width / 2;\n }, getBottom: function () {\n return this.pos.y + this.size.height / 2;\n }, cp: function () {\n return new Rect(this.pos.x, this.pos.y, this.size.width, this.size.height);\n }\n });\n if (typeof exports != 'undefined') exports.Rect = Rect;\n var Fx = new Class({\n initialize: function () {\n this.listeners = [];\n this.tweens = {};\n this.running = {};\n }, addListener: function (listener) {\n this.listeners.push(listener);\n }, add: function (key, props) {\n props = props || {};\n props.duration = props.duration || 500;\n props.transition = props.transition || Tween.Linear;\n props.repeats = typeof props.repeats == 'undefined' ? false : props.repeats;\n if (!props.tweens) {\n var start = props.start || 0;\n var end = typeof props.end == 'undefined' ? 1 : props.end;\n props.tweens = [[start, end]];\n }\n this.tweens[key] = props;\n }, update: function (time) {\n time = typeof time === 'number' ? time : now();\n for (var key in this.tweens) if (this.tweens.hasOwnProperty(key)) {\n if (!this.running[key]) {\n this.tweenStart(key, time);\n continue;\n }\n var tween = this.tweens[key];\n var tdelta = time - this.running[key].startTime;\n if (tdelta > tween.duration) {\n this.tweenFinished(tween, key);\n continue;\n }\n var delta = tween.transition(tdelta / tween.duration);\n var changes = [];\n for (var i = 0, t; t = tween.tweens[i]; i++) {\n var x = delta * (t[1] - t[0]) + t[0];\n changes.push(x);\n }\n this.fire(key, changes, delta);\n }\n }, tweenStart: function (key, time) {\n this.running[key] = {startTime: time};\n var values = [];\n for (var i = 0, tween; tween = this.tweens[key].tweens[i]; i++)\n values.push(tween[0]);\n this.fire(key, values, 0);\n }, tweenFinished: function (tween, key) {\n var values = [];\n for (var i = 0, t; t = tween.tweens[i]; i++)\n values.push(t[1]);\n this.fire(key, values, 1);\n if (!tween.repeats) {\n delete this.running[key];\n delete this.tweens[key];\n return;\n }\n this.tweenStart(key, now());\n }, fire: function (key, values, delta) {\n for (var i = 0, listener; listener = this.listeners[i]; i++)\n listener.set.call(listener, key, values, delta);\n }\n });\n var Tween = {\n Linear: function (x) {\n return x;\n }, Quadratic: function (x) {\n return x * x;\n }, Quintic: function (x) {\n return x * x * x;\n }, Shake: function (x) {\n return Math.sin(x);\n }\n };\n var GameGlobals = {\n FPS: 60, useAnimationFrame: true, boids: {flockRadius: 400, size: 100}, path: function () {\n return \"https://kickassapp.com/\" + Array.prototype.slice.call(arguments).join(\"\");\n }, hasCanvas: (typeof document.createElement('canvas').getContext !== 'undefined'), bulletColor: 'black'\n };\n window.GameGlobals = GameGlobals;\n if (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement) {\n if (this === void 0 || this === null)\n throw new TypeError();\n var t = Object(this);\n var len = t.length >>> 0;\n if (len === 0)\n return -1;\n var n = 0;\n if (arguments.length > 0) {\n n = Number(arguments[1]);\n if (n !== n)\n n = 0; else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0))\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n if (n >= len)\n return -1;\n var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n for (; k < len; k++) {\n if (k in t && t[k] === searchElement)\n return k;\n }\n return -1;\n };\n }\n\n function now() {\n return (new Date()).getTime();\n }\n\n function bind(bound, func) {\n return function () {\n return func.apply(bound, arguments);\n };\n }\n\n function each(arr, func, bindObject) {\n if (typeof arr.forEach == 'function') {\n arr.forEach(func, bindObject);\n return arr;\n }\n for (var key in arr) if (arr.hasOwnProperty(key))\n func.call(bindObject || window, arr[key], key);\n return arr;\n }\n\n function addEvent(obj, type, fn) {\n if (obj.addEventListener)\n obj.addEventListener(type, fn, false); else if (obj.attachEvent) {\n obj[\"e\" + type + fn] = fn;\n obj[type + fn] = function () {\n return obj[\"e\" + type + fn](window.event);\n };\n obj.attachEvent(\"on\" + type, obj[type + fn]);\n }\n }\n\n function removeEvent(obj, type, fn) {\n if (obj.removeEventListener)\n obj.removeEventListener(type, fn, false); else if (obj.detachEvent) {\n obj.detachEvent(\"on\" + type, obj[type + fn]);\n obj[type + fn] = null;\n obj[\"e\" + type + fn] = null;\n }\n }\n\n function stopEvent(e) {\n if (e.stopPropogation)\n e.stopPropogation();\n if (e.preventDefault)\n e.preventDefault();\n e.returnValue = false;\n }\n\n function elementIsContainedIn(element1, element2) {\n if (element.contains)\n return element1.contains(element2);\n return !!(element1.compareDocumentPosition(element2) & 16);\n };\n\n function code(name) {\n var table = {38: 'up', 40: 'down', 37: 'left', 39: 'right', 27: 'esc'};\n if (table[name]) return table[name];\n return String.fromCharCode(name);\n };\n\n function random(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n };\n\n function getRect(element) {\n if (typeof element.getBoundingClientRect === 'function') {\n var rect = element.getBoundingClientRect();\n var sx = window.pageXOffset;\n var sy = window.pageYOffset;\n return {width: rect.width, height: rect.height, left: rect.left + sx, top: rect.top + sy};\n }\n var rect = {width: element.offsetWidth, height: element.offsetHeight, left: 0, top: 0};\n var el = element;\n while (el) {\n rect.left += el.offsetLeft;\n rect.top += el.offsetTop;\n el = el.offsetParent;\n }\n return rect;\n }\n\n function getCompatElement() {\n var doc = document;\n return (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.documentElement : doc.body;\n }\n\n function getScrollSize() {\n var doc = getCompatElement();\n var min = {x: doc.clientWidth, y: doc.clientHeight};\n var body = document.body;\n return {\n x: Math.max(doc.scrollWidth, body.scrollWidth, min.x),\n y: Math.max(doc.scrollHeight, body.scrollHeight, min.y)\n };\n }\n\n function getStyle(element, prop) {\n if (element.style[prop])\n return element.style[prop];\n if (element.currentStyle)\n return element.currentStyle[prop];\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(prop);\n }\n\n function setStyles(element, props) {\n for (var key in props) if (props.hasOwnProperty(key)) {\n var val = props[key];\n if (typeof val === \"number\" && key !== \"opacity\" && key !== \"zIndex\")\n val = val + 'px';\n element.style[key] = val;\n }\n };\n\n function hasClass(ele, cls) {\n return ele.className.match(new RegExp('(\\\\s|^)' + cls + '(\\\\s|$)'));\n }\n\n function addClass(ele, cls) {\n if (!hasClass(ele, cls)) ele.className += \" \" + cls;\n }\n\n function removeClass(ele, cls) {\n if (hasClass(ele, cls)) {\n var reg = new RegExp('(\\\\s|^)' + cls + '(\\\\s|$)');\n ele.className = ele.className.replace(reg, ' ');\n }\n }\n\n function cloneElement(element) {\n return element.cloneNode(true);\n }\n\n function newElement(tag, props) {\n var el = document.createElement(tag);\n for (var key in props) if (props.hasOwnProperty(key)) {\n if (key === 'styles') {\n setStyles(el, props[key]);\n } else {\n el[key] = props[key];\n }\n }\n return el;\n }\n\n var requestAnimFrame = (function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback, element) {\n window.setTimeout(callback, 1000 / 60);\n };\n })();\n\n function delay(d, func, bound) {\n return setTimeout(bind(bound, func), d);\n }\n\n var KickAss = new Class({\n initialize: function (options) {\n if (options && options.mySite) {\n this.mySite = options.mySite;\n }\n this.players = [];\n this.elements = [];\n this.weaponClass = Weapons[1].cannonClass;\n this.scrollPos = new Vector(0, 0);\n this.scrollSize = new Vector(0, 0);\n this.windowSize = {width: 0, height: 0};\n this.updateWindowInfo();\n this.bulletManager = new BulletManager(this);\n this.bulletManager.updateEnemyIndex();\n this.explosionManager = new ExplosionManager(this);\n this.ui = new UIManager(this);\n this.bombManager = new BombManager(this);\n this.menuManager = new MenuManager(this);\n this.menuManager.create();\n if (typeof StatisticsManager !== \"undefined\") {\n this.statisticsManager = new StatisticsManager(this);\n }\n this.sessionManager = new SessionManager(this);\n this.lastUpdate = now();\n this.keyMap = {};\n this.keydownEvent = bind(this, this.keydown);\n this.keyupEvent = bind(this, this.keyup);\n this.multiplier = 10;\n if (this.isCampaign()) {\n this.audioManager = {\n explosion: new AudioManager(GameGlobals.path(\"static/sounds/game/explosion\"), [\"mp3\", \"ogg\"]),\n shot: new AudioManager(GameGlobals.path(\"static/sounds/game/shot\"), [\"mp3\", \"ogg\"])\n }\n } else {\n this.audioManager = {};\n }\n if (window.KickAssStyle && window.KickAssStyle === \"white\") {\n GameGlobals.bulletColor = \"white\";\n }\n addEvent(document, 'keydown', this.keydownEvent);\n addEvent(document, 'keyup', this.keyupEvent);\n addEvent(document, 'keypress', this.keydownEvent);\n }, begin: function () {\n this.addPlayer();\n this.sessionManager.isPlaying = true;\n if (!GameGlobals.useAnimationFrame) {\n this.loopTimer = window.setInterval(bind(this, this.loop), 1000 / GameGlobals.FPS);\n }\n if (GameGlobals.useAnimationFrame) {\n requestAnimFrame(bind(this, this.loop));\n }\n }, keydown: function (e) {\n var c = code(e.keyCode);\n this.keyMap[c] = true;\n switch (c) {\n case'left':\n case'right':\n case'up':\n case'down':\n case'esc':\n case' ':\n stopEvent(e);\n break;\n }\n switch (c) {\n case'esc':\n this.destroy();\n break;\n }\n }, keyup: function (e) {\n var c = code(e.keyCode);\n this.keyMap[c] = false;\n switch (c) {\n case'left':\n case'right':\n case'up':\n case'down':\n case'esc':\n case' ':\n if (e.stopPropogation) {\n e.stopPropogation();\n }\n if (e.preventDefault) {\n e.preventDefault();\n }\n e.returnValue = false;\n break;\n }\n }, loop: function () {\n var currentTime = now();\n var tdelta = (currentTime - this.lastUpdate) / 1000;\n this.updateWindowInfo();\n for (var i = 0, player; player = this.players[i]; i++) {\n player.update(tdelta);\n }\n this.bulletManager.update(tdelta);\n this.bombManager.update(tdelta);\n this.explosionManager.update(tdelta);\n this.ui.update(tdelta);\n if (this.statisticsManager) {\n this.statisticsManager.update(tdelta);\n }\n this.sessionManager.update(tdelta);\n this.lastUpdate = currentTime;\n if (GameGlobals.useAnimationFrame) {\n requestAnimFrame(bind(this, this.loop));\n }\n }, addPlayer: function () {\n var data = false;\n var ship = Ships.Standard;\n if (window.KICKASSSHIP && window.KICKASSSHIP.points) {\n ship = KICKASSSHIP;\n }\n if (this.mySite && this.mySite.getShipConfig()) {\n ship = this.mySite.getShipConfig();\n }\n var player = new Player(this);\n player.setShip(ship);\n this.players.push(player);\n this.explosionManager.addExplosion(player.pos);\n }, registerElement: function (el) {\n if (!el) {\n throw new Error(\"Can't register unexisting element.\");\n }\n this.elements.push(el);\n }, unregisterElement: function (el) {\n this.elements.splice(this.elements.indexOf(el), 1);\n }, isKickAssElement: function (el) {\n for (var i = 0, element; element = this.elements[i]; i++) {\n if (el === element || elementIsContainedIn(element, el)) {\n return true;\n }\n }\n return false;\n }, isKeyPressed: function (key) {\n return !!this.keyMap[key];\n }, updateWindowInfo: function () {\n var isIEQuirks = (!!window.ActiveXObject) && document.compatMode == \"BackCompat\";\n this.windowSize = {\n width: document.documentElement.clientWidth,\n height: document.documentElement.clientHeight\n };\n if (isIEQuirks) {\n this.windowSize.width = document.body.clientWidth;\n this.windowSize.height = document.body.clientHeight;\n }\n if (this.menuManager && this.menuManager.isVisible()) {\n this.windowSize.height -= this.menuManager.getHeight();\n }\n this.scrollPos.x = window.pageXOffset || document.documentElement.scrollLeft;\n this.scrollPos.y = window.pageYOffset || document.documentElement.scrollTop;\n this.scrollSize = getScrollSize();\n }, hideAll: function () {\n for (var i = 0, el; el = this.elements[i]; i++) {\n el.style.visibility = 'hidden';\n }\n }, showAll: function () {\n for (var i = 0, el; el = this.elements[i]; i++) {\n el.style.visibility = 'visible';\n }\n }, updateShips: function (ship, isInitial) {\n if (!isInitial) {\n this.ui.showMessage(\"You're now flying<br /><em>\" + ship.name + \"<em>!!\");\n }\n for (var i = 0, player; player = this.players[i]; i++) {\n player.setShip(ship);\n }\n }, changeWeapon: function (weapon, isInitial) {\n this.weaponClass = weapon.cannonClass;\n if (!isInitial) {\n this.ui.showMessage(\"Changed to \" + weapon.name.toUpperCase() + \"!!!!\");\n }\n for (var i = 0, player; player = this.players[i]; i++) {\n player.setCannons(weapon.cannonClass);\n }\n }, changeWeaponById: function (id, isInitial) {\n if (Weapons[id]) {\n this.changeWeapon(Weapons[id], isInitial);\n }\n }, flyOutPlayers: function (x, y) {\n for (var i = 0, player; player = this.players[i]; i++) {\n player.flyTo(x, -player.size.height);\n player.isBound = false;\n }\n }, flyInPlayers: function () {\n for (var i = 0, player; player = this.players[i]; i++) {\n player.flyTo(player.pos.x, 100, function () {\n this.isBound = true;\n });\n }\n }, newRank: function (rank) {\n this.ui.showMessage(\"OMG. You leveled up to: <strong>\" + rank + '</strong>!<br /><small>Be sure to check what cool new stuff you get in the menu.</small>');\n }, fireBomb: function () {\n this.bombManager.blow();\n }, destroy: function () {\n removeEvent(document, 'keydown', this.keydownEvent);\n removeEvent(document, 'keypress', this.keydownEvent);\n removeEvent(document, 'keyup', this.keyupEvent);\n for (var i = 0, player; player = this.players[i]; i++) {\n player.destroy();\n }\n this.bulletManager.destroy();\n this.explosionManager.destroy();\n this.menuManager.destroy();\n if (!GameGlobals.useAnimationFrame) {\n clearInterval(this.loopTimer);\n }\n getGlobalNamespace().KICKASSGAME = false;\n if (this.isCampaign()) {\n document.location.reload();\n }\n }, isCampaign: function () {\n return getGlobalNamespace().IS_CLOUDFLARE_GAME;\n }, isMySite: function () {\n return !!getGlobalNamespace().KICKASS_SITE_KEY;\n }, shouldShowAd: function () {\n return !this.mySite && !this.isCampaign();\n }, shouldShowMenu: function () {\n return !this.mySite && !this.isCampaign();\n }, shouldShowHowToImage: function () {\n return this.mySite || this.isCampaign();\n }\n });\n window.KickAss = KickAss;\n var StatisticsManager = new Class({\n initialize: function (game) {\n this.game = game;\n this.data = {};\n this.data.startedPlaying = now();\n this.data.elementsDestroyed = 0;\n this.data.shotsFired = 0;\n this.data.distanceFlownInPixels = 0;\n this.data.totalPointsThisSession = 0;\n this.data.usedThrusters = 0;\n this.lastUpdate = 0;\n }, usedThrusters: function () {\n this.data.usedThrusters = 1;\n }, increaseDistanceWithPixels: function (px) {\n this.data.distanceFlownInPixels += px;\n }, increasePointsGainedWithPoints: function (points) {\n this.data.totalPointsThisSession += points;\n }, addShotFired: function () {\n this.data.shotsFired++;\n if (this.game.audioManager.shot) {\n this.game.audioManager.shot.play();\n }\n }, addElementsDestroyed: function () {\n this.data.elementsDestroyed++;\n }, update: function (tdelta) {\n this.lastUpdate += tdelta;\n if (this.lastUpdate > 0.25) {\n this.syncWithServer();\n this.lastUpdate = 0;\n }\n }, syncWithServer: function () {\n var fragment = [];\n for (var key in this.data) if (this.data.hasOwnProperty(key)) {\n fragment.push(key + ':' + this.data[key]);\n }\n this.game.menuManager.sendMessageToMenu(\"stats:!\" + fragment.join('|'));\n }\n });\n var MySite = new Class({\n initialize: function (key) {\n this.key = key;\n }, load: function (callback) {\n CORS.request(GameGlobals.path('mysite/api.json'), {\n site_key: this.key,\n url: document.location.toString()\n }, bind(this, function (data) {\n if (data && data.embed) {\n this.mySiteData = data.embed;\n callback(true);\n } else {\n callback(false);\n }\n }));\n }, install: function () {\n }, getShipId: function () {\n return this.mySiteData && this.mySiteData.settings.ship;\n }, getShipConfig: function () {\n return this.mySiteData && this.mySiteData.settings.ship_config;\n }, getShareURL: function () {\n return this.mySiteData && this.mySiteData.settings.share_url;\n }\n });\n var Menu = new Class({\n initialize: function (game) {\n this.game = game;\n this.size = {height: 300};\n }, generate: function (parent) {\n this.container = document.createElement('div');\n this.container.className = 'KICKASSELEMENT';\n this.container.id = 'kickass-profile-menu';\n parent.appendChild(this.container);\n var shipId = getGlobalNamespace().KICKASSSHIPID || \"\";\n this.url = GameGlobals.path('intermediate_postmessage.html?url=' +\n encodeURIComponent(getGlobalNamespace().KICKASSURL || document.location.href) + \"&origin=\" + encodeURIComponent(document.location.href) + \"&preship=\" + (shipId) + \"&is_campaign=\" + (this.game.isCampaign() ? \"true\" : \"\") + \"&is_mysite=\" + (this.game.isMySite() ? \"true\" : \"\"));\n this.isSocketReady = false;\n this.socketIframe = document.createElement(\"iframe\");\n this.socketIframe.frameborder = '0';\n this.socketIframe.className = 'KICKASSELEMENT';\n this.socketIframe.width = '100%';\n this.socketIframe.height = this.size.height + 'px';\n this.container.appendChild(this.socketIframe);\n this.menuOrigin = \"https://kickassapp.com/\".replace(/\\/$/, \"\");\n this.socketIframe.src = this.url;\n this.onMessage = bind(this, function (event) {\n if (event.origin !== this.menuOrigin && event.origin !== this.menuOrigin.replace(\"http://\", \"https://\")) {\n console.log(\"ignoring event from\", event.origin);\n return;\n }\n var message = event.data;\n if (message === \"ready\") {\n this.onGameReady();\n return;\n }\n var t = message.split(':!');\n if (t.length !== 2) {\n return;\n }\n var type = t.shift().replace(/^./g, function (match) {\n return match.charAt(0).toUpperCase();\n });\n if (typeof this['messageType' + type] === \"function\") {\n this['messageType' + type](t.join(\":!\"));\n }\n });\n window.addEventListener(\"message\", this.onMessage, false);\n this.game.registerElement(this.container);\n }, socketPostMessage: function (message) {\n this.socketIframe.contentWindow.postMessage(message, this.menuOrigin);\n }, onGameReady: function () {\n this.isSocketReady = true;\n this.game.registerElement(this.container.getElementsByTagName('iframe')[0]);\n this.socketPostMessage(\"url:!\" + (getGlobalNamespace().KICKASSURL || document.location.href));\n if (this.game.statisticsManager) {\n this.game.statisticsManager.syncWithServer();\n }\n this.game.menuManager.onGameReady();\n }, sendMessage: function (message) {\n if (!this.isSocketReady) {\n return;\n }\n if (message != this.lastMessage) {\n try {\n this.socketPostMessage(message);\n } catch (e) {\n }\n this.lastMessage = message;\n }\n }, messageTypeChangeShip: function (pieces) {\n pieces = pieces.split(\",\");\n var shipId = pieces[0];\n var weaponId = pieces[1];\n var isInitial = pieces[2] === 'initial';\n if (this.shipId === shipId) {\n return;\n }\n if (isInitial && getGlobalNamespace().KICKASSSHIP) {\n return;\n }\n this.shipId = shipId;\n CORS.request(GameGlobals.path('designer/ship/' + shipId + '/construction.json'), {\n ship_id: shipId,\n is_initial: isInitial ? '1' : '0'\n }, bind(this, function (data) {\n this.game.updateShips(data.data, isInitial);\n try {\n window.focus();\n } catch (e) {\n }\n }));\n if (!isInitial) {\n this.parent.hideMenu();\n }\n }, messageTypeChangeWeapon: function (weaponId, isInitial) {\n this.game.changeWeaponById(weaponId, isInitial);\n }, messageTypeSetMultiplier: function (mod) {\n mod = parseInt(mod, 10);\n if (isNaN(mod) || !mod) {\n return;\n }\n this.game.multiplier = mod;\n }, messageTypeNewRank: function (rank) {\n this.game.newRank(rank);\n }, messageTypePlayerMessage: function (message) {\n this.game.ui.showMessage(message);\n }, destroy: function () {\n this.game.unregisterElement(this.container);\n this.game.unregisterElement(this.iframe);\n window.removeEventListener(\"message\", this.onMessage, false);\n this.container.parentNode.removeChild(this.container);\n }\n });\n var MenuManager = new Class({\n initialize: function (game) {\n this.game = game;\n this.numPoints = 0;\n if (!getGlobalNamespace().KICKASS_INLINE_CSS) {\n this.includeCSS(GameGlobals.path('css/menustyles.css'));\n }\n }, generateDefaults: function () {\n for (var id in Weapons) if (Weapons.hasOwnProperty(id)) {\n this.addWeapon(Weapons[id], id);\n }\n this.hideBombMenu();\n }, create: function () {\n this.container = document.createElement('div');\n this.container.className = 'KICKASSELEMENT KICKASShidden ' + (this.game.shouldShowMenu() ? \"\" : \"KICKASSNOMENU\");\n this.container.id = 'kickass-menu';\n if (this.game.shouldShowMenu()) {\n this.container.style.bottom = '-250px';\n this.container.style.display = 'none';\n } else {\n removeClass(this.container, \"KICKASShidden\");\n }\n getAppContainerElement().appendChild(this.container);\n var adHTML = \"\";\n this.container.innerHTML = '<div id=\"kickass-howto-image\" class=\"KICKASSELEMENT kickass-howto-invisible\"></div>' + '<div id=\"kickass-pointstab\" style=\"width: 200px;\" class=\"KICKASSELEMENT\">' +\n adHTML + '<div id=\"kickass-bomb-menu\" class=\"KICKASSELEMENT KICKASShidden\">' + '<ul id=\"kickass-bomb-list\" class=\"KICKASSELEMENT\">' + '</ul>' + '</div>' + '<div id=\"kickass-weapons-menu\" class=\"KICKASSELEMENT KICKASShidden\" style=\"display:none\">' + '<ul id=\"kickass-weapons-list\" class=\"KICKASSELEMENT\">' + '</ul>' + '</div>' + '<div id=\"kickass-pointstab-wrapper\" class=\"KICKASSELEMENT\">' + '<div id=\"kickass-points\" class=\"KICKASSELEMENT\">' +\n this.numPoints + '</div>' + '<div id=\"kickass-esctoquit\" class=\"KICKASSELEMENT\">Press esc to quit</div>' +\n this.getShareHTML() + '</div>' + '</div>';\n this.pointsTab = document.getElementById('kickass-pointstab');\n this.pointsTabWrapper = document.getElementById('kickass-pointstab-wrapper');\n this.points = document.getElementById('kickass-points');\n this.escToQuit = document.getElementById('kickass-esctoquit');\n this.howToImage = document.getElementById('kickass-howto-image');\n this.weaponsMenu = document.getElementById('kickass-weapons-menu');\n this.weaponsList = document.getElementById('kickass-weapons-list');\n this.bombLink = document.getElementById('kickass-bomb-menu');\n var all = this.container.getElementsByTagName('*');\n for (var i = 0; i < all.length; i++) {\n this.game.registerElement(all[i]);\n }\n this.game.registerElement(this.container);\n if (this.game.shouldShowMenu()) {\n this.menu = new Menu(this.game);\n this.menu.parent = this;\n this.menu.generate(this.container);\n } else {\n setTimeout(function () {\n this.onGameReady();\n }.bind(this), 100);\n }\n addEvent(this.bombLink, 'click', bind(this, function (e) {\n stopEvent(e);\n this.game.fireBomb();\n }));\n addEvent(this.pointsTabWrapper, 'click', bind(this, this.toggleMenu));\n addEvent(this.weaponsMenu, 'click', bind(this, this.toggleWeaponsMenu));\n this.generateDefaults();\n }, getShareHTML: function () {\n return \"\";\n }, onGameReady: function () {\n this.container.style.display = 'block';\n if (this.game.shouldShowHowToImage()) {\n setTimeout(bind(this, function () {\n removeClass(this.howToImage, \"kickass-howto-invisible\");\n }), 10);\n setTimeout(bind(this, function () {\n addClass(this.howToImage, \"kickass-howto-invisible\");\n }), 4000);\n }\n }, navigateTo: function (page, dontShowMenu) {\n if (!dontShowMenu) {\n this.showMenu();\n }\n if (this.menu) {\n this.menu.socketPostMessage('navigate:!' + page);\n }\n }, toggleMenu: function () {\n if (this.game.shouldShowMenu()) {\n if (hasClass(this.container, 'KICKASShidden')) {\n this.showMenu();\n } else {\n this.hideMenu();\n }\n } else {\n this.showMenu();\n }\n }, toggleWeaponsMenu: function () {\n if (hasClass(this.weaponsMenu, 'KICKASShidden')) {\n this.showWeaponsMenu();\n } else {\n this.hideWeaponsMenu();\n }\n }, hideWeaponsMenu: function () {\n this.weaponsMenu.style.width = '';\n addClass(this.weaponsMenu, 'KICKASShidden');\n }, showWeaponsMenu: function () {\n var last = this.weaponsMenu.getElementsByTagName('li');\n last = last[last.length - 1];\n this.weaponsMenu.style.width = (last.offsetLeft + last.offsetWidth - 47) + 'px';\n removeClass(this.weaponsMenu, 'KICKASShidden');\n }, showMenu: function () {\n if (this.game.shouldShowMenu()) {\n this.container.style.bottom = '';\n removeClass(this.container, 'KICKASShidden');\n }\n }, hideMenu: function () {\n this.container.style.bottom = '';\n addClass(this.container, 'KICKASShidden');\n }, showBombMenu: function () {\n this.bombLink.style.width = \"\";\n }, hideBombMenu: function () {\n this.bombLink.style.width = \"0px\";\n }, getHeight: function () {\n return this.container.clientHeight;\n }, isVisible: function () {\n return !hasClass(this.container, 'KICKASShidden');\n }, addPoints: function (killed, pos) {\n var points = killed * this.game.multiplier;\n this.numPoints += points;\n this.points.innerHTML = this.numPoints;\n if (this.game.statisticsManager) {\n this.game.statisticsManager.increasePointsGainedWithPoints(points);\n }\n this.game.ui.addPointsBubbleAt(pos, points);\n }, includeCSS: function (file) {\n var link = document.createElement('link');\n link.rel = 'stylesheet';\n link.type = 'text/css';\n link.href = file;\n (document.head || document.body).appendChild(link);\n }, sendMessageToMenu: function (fragment) {\n if (this.menu) {\n this.menu.sendMessage(fragment);\n }\n }, addWeapon: function (weapon, id) {\n var li = document.createElement('li');\n li.className = 'KICKASSELEMENT kickass-weapon-item';\n li.weapon = weapon;\n li.style.backgroundImage = 'url(' + GameGlobals.path('css/gfx/kickass/weap-' + weapon.id + '.png') + ')';\n li.innerHTML = '<span class=\"KICKASSELEMENT\">' + weapon.name + '</span>';\n this.weaponsList.appendChild(li);\n addEvent(li, 'click', bind(this, function (e) {\n stopEvent(e);\n this.changeWeapon(weapon);\n this.sendMessageToMenu(\"changeWeapon:!\" + id);\n }));\n }, changeWeapon: function (weapon) {\n this.game.changeWeapon(weapon);\n }, destroy: function () {\n var all = this.container.getElementsByTagName('*');\n for (var i = 0; i < all.length; i++) {\n this.game.unregisterElement(all[i]);\n }\n this.game.unregisterElement(this.container);\n if (this.menu) {\n this.menu.destroy();\n }\n this.container.parentNode.removeChild(this.container);\n }\n });\n var UIManager = new Class({\n initialize: function (game) {\n this.UNIQID = 0;\n this.game = game;\n this.pointBubbles = {};\n this.messages = {};\n this.fx = new Fx();\n this.fx.addListener(this);\n }, update: function (tdelta) {\n this.fx.update();\n }, set: function (key, value, delta) {\n var type = key.split('-')[0];\n var id = key.split('-')[1];\n if (this.pointBubbles[id]) {\n var bubble = this.pointBubbles[id];\n bubble.style.top = value[0] + 'px';\n bubble.style.opacity = value[1];\n if (delta == 1 && bubble.parentNode) {\n bubble.parentNode.removeChild(bubble);\n delete this.pointBubbles[id];\n }\n } else if (this.messages[id] && type == 'messagedown') {\n var message = this.messages[id];\n message.style.top = value[0] + 'px';\n if (delta == 1) {\n setTimeout(bind(this, function () {\n this.fx.add('messageup-' + id, {\n tweens: [[value[0], -100]],\n transition: Tween.Quadratic,\n duration: 300\n });\n }), message.staytime || 4000);\n }\n } else if (this.messages[id] && type == 'messageup') {\n var message = this.messages[id];\n message.style.top = value[0] + 'px';\n if (delta == 1) {\n message.parentNode.removeChild(message);\n delete this.messages[id];\n }\n }\n }, addPointsBubbleAt: function (pos, points) {\n var id = 'bubble' + (this.UNIQID++);\n var y = this.game.scrollPos.y + pos.y;\n var bubble = newElement('span', {\n innerHTML: points,\n className: 'KICKASSELEMENT',\n styles: {\n position: 'absolute',\n font: \"20px Arial\",\n fontWeight: \"bold\",\n opacity: \"1\",\n color: \"black\",\n textShadow: \"#fff 1px 1px 3px\",\n top: y,\n zIndex: \"10000000\"\n }\n });\n bubble.style.left = pos.x - bubble.offsetWidth / 2 + 'px';\n getAppContainerElement().appendChild(bubble);\n this.pointBubbles[id] = bubble;\n this.fx.add('bubble-' + id, {tweens: [[y, y - 15], [1, 0]]});\n }, showMessage: function (html, staytime) {\n staytime = staytime || false;\n var width = 300;\n var id = this.UNIQID++;\n var message = newElement('div', {\n innerHTML: html,\n className: 'KICKASSELEMENT',\n id: 'kickass-message-' + id,\n styles: {\n position: 'fixed',\n top: -100,\n left: '50%',\n marginLeft: -width / 2,\n width: width,\n background: '#222',\n opacity: 0.8,\n padding: '10px',\n color: '#fff',\n textAlign: 'center',\n borderRadius: 15,\n font: '20px Arial',\n fontWeight: 'bold',\n zIndex: \"10000000\"\n }\n });\n message.staytime = staytime;\n getAppContainerElement().appendChild(message);\n var to = this.getLowestBubbleY();\n message.kickassto = to;\n this.fx.add('messagedown-' + id, {duration: 300, tweens: [[-100, to]], transition: Tween.Quadratic});\n this.messages[id] = message;\n return message;\n }, getLowestBubbleY: function () {\n var top = 100;\n for (var id in this.messages) if (this.messages.hasOwnProperty(id))\n top = Math.max(this.messages[id].kickassto + this.messages[id].offsetHeight + 10, top);\n return top;\n }\n });\n var AudioManager = new Class({\n initialize: function (src, formats) {\n this.src = src;\n this.formats = formats;\n channels = 8;\n this.supportsAudio = (typeof document.createElement('audio').play) != 'undefined';\n if (this.supportsAudio) {\n this.numChannels = channels;\n this.channels = [];\n for (var i = 0; i < this.numChannels; i++) {\n this.channels.push({isPlaying: false, element: this.prepareElement(this.buildAudioElement())});\n }\n }\n }, buildAudioElement: function () {\n var TYPES = {\"ogg\": \"audio/ogg\", \"mp3\": \"audio/mpeg\"}\n var audio = document.createElement(\"audio\");\n for (var i = 0, format; format = this.formats[i]; i++) {\n var source = document.createElement(\"source\");\n source.src = this.src + \".\" + format;\n source.type = TYPES[format];\n audio.appendChild(source);\n }\n return audio;\n }, prepareElement: function (el) {\n if (typeof el.addEventListener == 'undefined')\n return el;\n var self = this;\n el.addEventListener('ended', function (e) {\n self.audioEnded(el);\n }, false);\n return el;\n }, audioEnded: function (target) {\n for (var i = 0, channel; channel = this.channels[i]; i++) {\n if (channel.element === target) {\n channel.isPlaying = false;\n }\n }\n }, play: function () {\n if (!this.supportsAudio) return;\n for (var i = 0, channel; channel = this.channels[i]; i++) {\n if (!channel.isPlaying) {\n channel.isPlaying = true;\n if (typeof channel.element.play == 'function')\n channel.element.play();\n return;\n }\n }\n }\n });\n var Ships = {\n Standard: {\n points: [[-10, 10], [0, -15], [10, 10]],\n thrusters: [{s: {w: 20, h: 7}, p: {x: 0, y: 14}, a: 0}],\n cannons: [{p: {x: 0, y: -15}, a: 0}]\n }\n };\n var PLAYERIDS = 0;\n var Player = new Class({\n initialize: function (game) {\n this.id = PLAYERIDS++;\n this.game = game;\n this.tween = false;\n this.isBound = true;\n this.pos = new Vector(1630, 217);//飞机初始化位置\n this.vel = new Vector(0, 0);\n this.acc = new Vector(0, 0);\n this.dir = new Vector(0, 1);\n this.currentRotation = 0;\n this.isBroken = false;\n this.lineOffsets = [];\n this.deadTime = 0;\n this.friction = 0.95;\n this.terminalVelocity = 2000;\n this.lastPos = new Vector(0, 0);\n }, setShip: function (ship) {\n this.ship = ship;\n this.verts = [];\n for (var i = 0, vert; vert = this.ship.points[i]; i++)\n this.verts.push(new Vector(vert[0], vert[1]));\n this.verts.push(this.verts[0]);\n this.thrusters = [];\n this.cannons = [];\n this.addThrusters(this.ship.thrusters);\n this.addCannons(this.ship.cannons);\n this.size = this.getSizeFromVertsAndObjects();\n this.bounds = this.calculateBounds();\n if (this.sheet) {\n this.sheet.destroy();\n }\n this.sheet = new Sheet(new Rect(100, 100, this.bounds.x, this.bounds.y));\n this.forceRedraw = true;\n }, setCannons: function (cannonClass) {\n var newCannons = [];\n for (var i = 0, cannon; cannon = this.cannons[i]; i++) {\n var newCannon = new cannonClass(this, this.game, cannon.pos.x, cannon.pos.y, cannon.angle);\n newCannons.push(newCannon);\n cannon.destroy();\n }\n this.cannons = newCannons;\n }, addThrusters: function (thrusters) {\n for (var i = 0, data; data = thrusters[i]; i++) {\n var thruster = new Thruster(data);\n this.thrusters.push(thruster);\n }\n }, addCannons: function (cannons) {\n for (var i = 0, data; data = cannons[i]; i++) {\n var weaponClass = WeaponMap[data.m] || WeaponMap.cannon;\n var cannon = new weaponClass.cannonClass(this, this.game, data.p.x, data.p.y, data.a);\n cannon.player = this;\n cannon.game = this.game;\n this.cannons.push(cannon);\n }\n }, update: function (tdelta) {\n if (this.isBroken) {\n if (!this.lineOffsets.length) {\n for (var i = 0; i < (this.verts.length - 1); i++)\n this.lineOffsets[i] = {\n pos: new Vector(0, 0),\n dir: (new Vector(1, 1)).setAngle(Math.PI * 2 * Math.random())\n };\n }\n for (var i = 0; i < this.lineOffsets.length; i++) {\n this.lineOffsets[i].pos.add(this.lineOffsets[i].dir.cp().setLength(50).mul(tdelta));\n }\n this.sheet.clear();\n this.sheet.setAngle(this.dir.angle());\n this.sheet.setPosition(this.pos);\n this.sheet.drawBrokenPlayer(this.verts, this.lineOffsets);\n if (now() - this.deadTime > 1000.0) {\n this.isBroken = false;\n this.lineOffsets = [];\n this.randomPos();\n }\n return;\n }\n if (!this.tween) {\n if (this.game.isKeyPressed('left') || this.game.isKeyPressed('right')) {\n if (this.game.isKeyPressed('left'))\n this.rotateLeft(tdelta);\n if (this.game.isKeyPressed('right'))\n this.rotateRight(tdelta);\n } else {\n this.stopRotate();\n }\n if (this.game.isKeyPressed('up'))\n this.activateThrusters(); else\n this.stopThrusters();\n }\n if (this.game.isKeyPressed(' ')) {\n this.isShooting = true;\n if (!this.isBroken)\n this.shootPressed();\n } else if (this.isShooting) {\n this.isShooting = false;\n this.shootReleased();\n }\n if (this.currentRotation)\n this.dir.setAngle(this.dir.angle() + this.currentRotation * tdelta);\n var frictionedAcc = this.acc.mulNew(tdelta).sub(this.vel.mulNew(tdelta * this.friction));\n this.vel.add(frictionedAcc);\n if (this.vel.len() > this.terminalVelocity)\n this.vel.setLength(this.terminalVelocity);\n var posDelta = this.vel.mulNew(tdelta);\n this.pos.add(posDelta);\n if (this.game.statisticsManager) {\n this.game.statisticsManager.increaseDistanceWithPixels(posDelta.len());\n }\n var showFlames = !this.acc.is({x: 0, y: 0});\n for (var i = 0, thruster; thruster = this.thrusters[i]; i++) {\n thruster.setIsShown(showFlames);\n thruster.update(tdelta);\n }\n if (this.isBound)\n this.checkBounds();\n if (!this.lastPos.is(this.pos) || this.currentRotation || this.forceRedraw) {\n this.forceRedraw = false;\n this.sheet.clear();\n this.sheet.setAngle(this.dir.angle() + Math.PI / 2);\n this.sheet.setPosition(this.pos);\n if (showFlames) {\n for (var i = 0, thruster; thruster = this.thrusters[i]; i++)\n thruster.drawTo(this.sheet);\n }\n this.sheet.drawPlayer(this.verts);\n this.lastPos = this.pos.cp();\n }\n for (var i = 0, cannon; cannon = this.cannons[i]; i++) {\n cannon.update(tdelta);\n }\n }, randomPos: function () {\n var w = this.game.windowSize.width;\n var h = this.game.windowSize.height;\n this.pos = new Vector(random(0, w), random(0, h));\n }, checkBounds: function () {\n if (this.tween)\n return;\n var w = this.game.windowSize.width;\n var h = this.game.windowSize.height;\n var rightBound = this.pos.x + this.sheet.rect.size.width / 2;\n var bottomBound = this.pos.y + this.sheet.rect.size.height / 2;\n if (rightBound > w) {\n window.scrollTo(this.game.scrollPos.x + 50, this.game.scrollPos.y);\n this.pos.x = 0;\n } else if (this.pos.x < 0) {\n window.scrollTo(this.game.scrollPos.x - 50, this.game.scrollPos.y);\n this.pos.x = w - this.sheet.rect.size.width / 2;\n }\n if (bottomBound > h) {\n window.scrollTo(this.game.scrollPos.x, this.game.scrollPos.y + h * 0.75);\n this.pos.y = 0;\n } else if (this.pos.y < 0) {\n window.scrollTo(this.game.scrollPos.x, this.game.scrollPos.y - h * 0.75);\n this.pos.y = h - this.sheet.rect.size.height / 2;\n }\n }, inRect: function (rect) {\n var ret = false;\n for (var i = 0, vert; vert = this.verts[i]; i++) {\n if (rect.hasPoint(new Vector(vert.x + this.pos.x, vert.y + this.pos.y)))\n ret = true;\n }\n return ret;\n }, hit: function (by) {\n if (this.isBroken) return;\n this.isBroken = true;\n this.deadTime = now();\n }, activateThrusters: function () {\n if (this.game.statisticsManager) {\n this.game.statisticsManager.usedThrusters();\n }\n this.acc = (new Vector(500, 0)).setAngle(this.dir.angle());\n }, stopThrusters: function () {\n this.acc = new Vector(0, 0);\n }, rotateLeft: function (tdelta) {\n this.currentRotation = Math.max(-Math.PI * 2, this.currentRotation - Math.PI * 10 * tdelta);\n }, rotateRight: function (tdelta) {\n this.currentRotation = Math.min(Math.PI * 2, this.currentRotation + Math.PI * 10 * tdelta);\n }, stopRotate: function () {\n this.currentRotation = 0;\n }, getSizeFromVertsAndObjects: function () {\n var largestDistance = 0;\n for (var i = 0, vert; vert = this.verts[i]; i++)\n largestDistance = Math.max(largestDistance, (new Vector(vert)).len());\n for (var i = 0, obj; obj = this.thrusters[i]; i++) {\n var p1 = (new Vector(obj.pos.x - obj.size.width / 2, obj.pos.y - obj.size.height / 2)).rotate(obj.angle);\n var p2 = (new Vector(obj.pos.x + obj.size.width / 2, obj.pos.y - obj.size.height / 2)).rotate(obj.angle);\n var p3 = (new Vector(obj.pos.x - obj.size.width / 2, obj.pos.y + obj.size.height / 2)).rotate(obj.angle);\n var p4 = (new Vector(obj.pos.x + obj.size.width / 2, obj.pos.y + obj.size.height / 2)).rotate(obj.angle);\n largestDistance = Math.max(largestDistance, p1.len(), p2.len(), p3.len(), p4.len());\n }\n return {width: largestDistance * 2, height: largestDistance * 2};\n }, calculateBounds: function () {\n return {\n x: Math.max(this.size.width, this.size.height) * 1,\n y: Math.max(this.size.height, this.size.width) * 1\n };\n }, shootPressed: function () {\n for (var i = 0, cannon; cannon = this.cannons[i]; i++)\n cannon.shootPressed();\n }, shootReleased: function () {\n for (var i = 0, cannon; cannon = this.cannons[i]; i++)\n cannon.shootReleased();\n }, flyTo: function (x, y, callback) {\n this.tween = {\n start: {pos: this.pos.cp(), dir: this.dir.cp()},\n to: new Vector(x, y),\n callback: callback || function () {\n }\n };\n this.tween.time = this.getTimeforTween();\n }, destroy: function () {\n this.sheet.destroy();\n }\n });\n var Thruster = new Class({\n initialize: function (data, ship) {\n this.pos = new Vector(data.p);\n this.size = {width: data.s.w, height: data.s.h};\n this.angle = data.a || 0;\n this.ship = ship;\n this.isShown = false;\n this.flameY = 1;\n this.fx = new Fx();\n this.fx.addListener(this);\n this.flames = {r: [], y: []};\n this.lastFrameUpdate = 0;\n this.generateFlames();\n }, update: function (tdelta) {\n this.fx.update();\n if (now() - this.lastFrameUpdate > 1000 / 60)\n this.generateFlames();\n }, set: function (key, value) {\n switch (key) {\n case'flames':\n this.flameY = value;\n break;\n }\n }, setIsShown: function (isShown) {\n if (!this.isShown && isShown) {\n this.flameY = 0.0;\n this.generateFlames();\n this.fx.add('flames', {start: this.flameY, end: 1, duration: 250, transition: Tween.Quintic});\n }\n this.isShown = isShown;\n }, drawTo: function (sheet) {\n sheet.drawFlames(this.flames, this.angle);\n }, generateFlames: function () {\n var redWidth = this.size.width, redIncrease = this.size.width * 0.05, yellowWidth = this.size.width * 0.8,\n yellowIncrease = yellowWidth * 0.1, halfRed = redWidth / 2, halfYellow = yellowWidth / 2,\n offsetY = -this.size.height / 2, metaY = 0;\n var px = this.pos.x;\n var py = this.pos.y - this.size.height / 2;\n\n function vec(x, y) {\n return new Vector(x, y);\n }\n\n this.flames.r = [vec(-halfRed + px, py)];\n this.flames.y = [vec(-halfYellow + px, py)];\n this.flames.self = this;\n for (var x = 0; x < redWidth; x += redIncrease)\n this.flames.r.push(vec(x - halfRed + px, this.flameY * random(this.size.height * 0.7, this.size.height) + py));\n this.flames.r.push(vec(halfRed + px, py));\n for (var x = 0; x < yellowWidth; x += yellowIncrease)\n this.flames.y.push(vec(x - halfYellow + px, this.flameY * random(this.size.height * 0.4, this.size.height * 0.7) + py));\n this.flames.y.push(vec(halfYellow + px, py));\n this.lastFrameUpdate = now();\n var pos = vec(px, py);\n for (var i = 0, p; p = this.flames.r[i]; i++)\n p.sub(pos).rotate(this.angle).add(pos);\n for (var i = 0, p; p = this.flames.y[i]; i++)\n p.sub(pos).rotate(this.angle).add(pos);\n }\n });\n var BombManager = new Class({\n initialize: function (game) {\n this.game = game;\n this.bombShowDelay = 30;\n this.nextBomb = this.bombShowDelay;\n }, update: function (tdelta) {\n if (this.game.isKeyPressed('F') && this.isReady()) {\n this.blow();\n }\n if (this.nextBomb === -1 || !this.game.sessionManager.isPlaying) {\n return;\n }\n this.nextBomb -= tdelta;\n if (this.nextBomb < 0) {\n this.game.menuManager.showBombMenu();\n this.nextBomb = -1;\n this.game.ui.showMessage(\"BOMB IS READY<br />(lower right corner or F)\");\n }\n }, blow: function () {\n var message = this.game.ui.showMessage(\"3...\", 5000);\n delay(1000, function () {\n message.innerHTML = \"2...\";\n }, this);\n delay(2000, function () {\n message.innerHTML = \"1...\";\n }, this);\n delay(3000, function () {\n message.innerHTML = \"boom\";\n }, this);\n delay(3000, this.blowStuffUp, this);\n this.nextBomb = this.bombShowDelay;\n }, blowStuffUp: function () {\n this.game.bulletManager.updateEnemyIndex();\n var index = this.game.bulletManager.enemyIndex;\n for (var i = 0, el; (el = index[i]) && i < 10; i++) {\n var rect = getRect(el);\n var center = new Vector(rect.left + rect.width / 2, rect.top + rect.height / 2);\n this.game.explosionManager.addExplosion(center, el, MegaParticleExplosion);\n el.parentNode.removeChild(el);\n }\n this.game.menuManager.hideBombMenu();\n this.nextBomb = this.bombShowDelay;\n }, isReady: function () {\n return this.nextBomb === -1;\n }\n });\n var ELEMENTSTHATARENOTTOBEINCLUDED = ['BR', 'SCRIPT', 'STYLE', 'TITLE', 'META', 'HEAD', 'OPTION', 'OPTGROUP', 'LINK'];\n var ELEMENTSIZETHRESHOLD = 5;\n var BulletManager = new Class({\n initialize: function (game) {\n this.game = game;\n this.lastBlink = 0;\n this.blinkActive = false;\n this.enemyIndex = [];\n this.updateDelay = 2.5;\n this.nextUpdate = this.updateDelay;\n }, update: function (tdelta) {\n if (this.game.isKeyPressed('B')) {\n this.blink();\n } else if (this.blinkActive) {\n this.endBlink();\n }\n this.nextUpdate -= tdelta;\n if (this.nextUpdate < 0) {\n this.updateEnemyIndex();\n }\n }, blink: function () {\n if (now() - this.lastBlink > 250) {\n for (var i = 0, el; el = this.enemyIndex[i]; i++) {\n if (!this.blinkActive)\n el.style.outline = '1px solid red'; else\n el.style.outline = el.KICKASSOLDBORDER;\n }\n this.blinkActive = !this.blinkActive;\n this.lastBlink = now();\n if (!this.blinkActive) {\n this.updateEnemyIndex();\n }\n }\n }, endBlink: function () {\n for (var i = 0, el; el = this.enemyIndex[i]; i++)\n el.style.outline = el.KICKASSOLDBORDER;\n this.lastBlink = 0;\n this.blinkActive = false;\n }, updateEnemyIndex: function () {\n var all = document.getElementsByTagName('*');\n this.enemyIndex = [];\n for (var i = 0, el; el = all[i]; i++) {\n if (this.isDestroyable(el)) {\n this.enemyIndex.push(el);\n el.KICKASSOLDBORDER = el.style.outline || (document.defaultView.getComputedStyle(el, null).outline);\n }\n }\n this.nextUpdate = this.updateDelay;\n }, isDestroyable: function (element, ignoreSize) {\n if (this.shouldIgnoreElement(element, ignoreSize))\n return false;\n for (var i = 0, child; child = element.childNodes[i]; i++) {\n if (child.nodeType === 1 && ELEMENTSTHATARENOTTOBEINCLUDED.indexOf(child.tagName) === -1 && (child.offsetWidth >= ELEMENTSIZETHRESHOLD && child.offsetHeight >= ELEMENTSIZETHRESHOLD) && document.defaultView.getComputedStyle(child, null).visibility !== 'hidden') {\n return false;\n }\n }\n return true;\n }, isDestroyableFromCollision: function (element) {\n return this.isDestroyable(element, true);\n }, shouldIgnoreElement: function (element, ignoreSize) {\n if (element.nodeType !== 1)\n return true;\n if (element == document.documentElement || element == document.body)\n return true;\n if (ELEMENTSTHATARENOTTOBEINCLUDED.indexOf(element.tagName) !== -1)\n return true;\n if (element.style.visibility == 'hidden' || element.style.display == 'none')\n return true;\n if (typeof element.className == \"string\" && element.className.indexOf('KICKASSELEMENT') != -1)\n return true;\n if (!ignoreSize) {\n if (element.offsetWidth < ELEMENTSIZETHRESHOLD || element.offsetHeight < ELEMENTSIZETHRESHOLD)\n return true;\n }\n var rect;\n if (element.offsetLeft < 0 || element.offsetTop < 0) {\n rect = getRect(element);\n if (rect.left + rect.width < 0 || rect.top + rect.height < 0)\n return true;\n }\n if (!rect)\n rect = getRect(element);\n if (rect.top >= this.game.scrollSize.y)\n return true;\n return false;\n }, destroy: function () {\n for (var key in this.bullets) if (this.bullets.hasOwnProperty(key))\n for (var i = 0, bullet; bullet = this.bullets[key][i]; i++)\n bullet.destroy();\n this.bullets = {};\n }\n });\n var SessionManager = new Class({\n initialize: function (game) {\n this.game = game;\n this.isPlaying = false;\n }, update: function (tdelta) {\n if (this.isPlaying && this.game.bulletManager.enemyIndex.length == 0) {\n this.weHaveWon();\n }\n }, weHaveWon: function () {\n this.isPlaying = false;\n this.game.ui.showMessage(\"You're done!\");\n if (this.game.isCampaign()) {\n this.game.menuManager.showMenu();\n this.game.menuManager.navigateTo('highscores');\n } else {\n this.game.menuManager.showMenu();\n }\n this.game.menuManager.sendMessageToMenu(\"gameFinished:!\");\n }\n });\n var ExplosionManager = new Class({\n initialize: function (game) {\n this.game = game;\n this.explosions = [];\n }, update: function (tdelta) {\n var time = now();\n for (var i = 0, explosion; explosion = this.explosions[i]; i++) {\n if (time - explosion.bornAt > (explosion.ttl || 500)) {\n explosion.destroy();\n this.explosions.splice(i, 1);\n continue;\n }\n explosion.update(tdelta);\n }\n }, addExplosion: function (pos, forElement, explosionClass) {\n explosionClass = explosionClass || ParticleExplosion;\n var explosion = new explosionClass(pos, forElement);\n explosion.game = this.game;\n explosion.checkBounds();\n this.explosions.push(explosion);\n if (this.game.audioManager.explosion) {\n this.game.audioManager.explosion.play();\n }\n }, destroy: function () {\n for (var i = 0, explosion; explosion = this.explosions[i]; i++)\n explosion.destroy();\n this.explosions = [];\n }\n });\n var Cannon = new Class({\n initialize: function (player, game, x, y, angle) {\n this.player = player;\n this.game = game;\n this.pos = new Vector(x, y);\n this.angle = angle || 0;\n }, shootPressed: function () {\n }, shootReleased: function () {\n }, checkCollisions: function () {\n }, getExplosionClass: function () {\n return ParticleExplosion;\n }, update: function (tdelta) {\n this.game.hideAll();\n this.checkCollisions(tdelta);\n this.game.showAll();\n }, checkCollision: function (bullet) {\n var hit = bullet.checkCollision();\n if (!hit)\n return false;\n this.game.explosionManager.addExplosion(bullet.pos, hit, this.getExplosionClass());\n this.game.menuManager.addPoints(Math.min(hit.getElementsByTagName('*').length + 1, 100), bullet.pos);\n if (!hit.isShot) {\n hit.parentNode.removeChild(hit);\n }\n if (this.game.statisticsManager) {\n this.game.statisticsManager.addElementsDestroyed();\n }\n return true;\n }, createBullet: function (bulletClass) {\n var pos = this.getABulletPos();\n var dir = this.getABulletDir();\n var bullet = new bulletClass(pos, dir);\n bullet.game = this.game;\n bullet.manager = this;\n bullet.initCanvas();\n bullet.vel.add(bullet.vel.cp().setLength(this.player.vel.len()));\n return bullet;\n }, getABulletPos: function () {\n return this.player.pos.cp().add(this.pos.cp().rotate(this.player.dir.angle() + Math.PI / 2));\n }, getABulletDir: function () {\n return this.player.dir.cp().rotate(this.angle);\n }, destroy: function () {\n }\n });\n var LaserCannon = new Class({\n Extends: Cannon, initialize: function (player, game, x, y, angle) {\n Cannon.prototype.initialize.apply(this, arguments);\n this.lasers = [];\n }, getExplosionClass: function () {\n return SplitExplosion;\n }, update: function (tdelta) {\n if (!this.lasers.length)\n return;\n this.removeOld();\n Cannon.prototype.update.call(this, tdelta);\n }, checkCollisions: function (tdelta) {\n for (var i = 0, laser; laser = this.lasers[i]; i++) {\n laser.update(tdelta);\n if (this.checkCollision(laser)) {\n }\n }\n }, removeOld: function () {\n for (var i = 0, laser; laser = this.lasers[i]; i++) {\n if (laser.outOfBounds) {\n laser.destroy();\n this.lasers.splice(i, 1);\n }\n }\n }, shootPressed: function () {\n if (this.lasers.length > 5) {\n return;\n }\n if (now() - this.lastFired < 500) {\n return;\n }\n this.lastFired = now();\n if (this.game.statisticsManager) {\n this.game.statisticsManager.addShotFired();\n }\n this.lasers.push(this.createBullet(LaserBullet));\n }, destroy: function () {\n if (this.lasers.length) {\n for (var i = 0, laser; laser = this.lasers[i]; i++) {\n laser.destroy();\n }\n this.lasers = [];\n }\n }\n });\n var BallCannon = new Class({\n Extends: Cannon, initialize: function () {\n Cannon.prototype.initialize.apply(this, arguments);\n this.lastFired = 0;\n this.bullets = [];\n }, getExplosionClass: function () {\n return ParticleExplosion;\n }, update: function (tdelta) {\n if (!this.bullets.length) {\n return;\n }\n this.removeOld();\n Cannon.prototype.update.call(this, tdelta);\n }, removeOld: function () {\n var time = now();\n for (var i = 0, bullet; bullet = this.bullets[i]; i++) {\n if (time - bullet.bornAt > 2000) {\n bullet.destroy();\n this.bullets.splice(i, 1);\n }\n }\n }, checkCollisions: function (tdelta) {\n for (var i = 0, bullet; bullet = this.bullets[i]; i++) {\n bullet.update(tdelta);\n if (this.checkCollision(bullet)) {\n bullet.destroy();\n this.bullets.splice(i, 1);\n }\n }\n }, shootPressed: function () {\n if (now() - this.lastFired < 200) {\n return;\n }\n this.lastFired = now();\n this.addBullet();\n if (this.game.statisticsManager) {\n this.game.statisticsManager.addShotFired();\n }\n }, addBullet: function () {\n if (this.bullets.length > 7) {\n this.bullets[0].destroy();\n this.bullets.shift();\n }\n var bullet = this.createBullet(Bullet);\n this.bullets.push(bullet);\n }, destroy: function () {\n for (var i = 0, bullet; bullet = this.bullets[i]; i++) {\n bullet.destroy();\n }\n this.bullets = [];\n }\n });\n var Bullet = new Class({\n initialize: function (pos, dir) {\n this.pos = pos.cp();\n this.dir = dir;\n this.vel = new Vector(500, 500);\n this.bornAt = now();\n }, initCanvas: function () {\n this.sheet = new Sheet(new Rect(this.pos.x, this.pos.y, 5, 5));\n this.sheet.drawBullet();\n }, draw: function () {\n this.sheet.setPosition(this.pos);\n }, update: function (tdelta) {\n this.pos.add(this.vel.setAngle(this.dir.angle()).mulNew(tdelta));\n this.checkBounds();\n this.draw();\n }, checkCollision: function () {\n var element = document.elementFromPoint(this.pos.x, this.pos.y);\n if (element && element.nodeType == 3)\n element = element.parentNode;\n var didFind = element && this.game.bulletManager.isDestroyableFromCollision(element) ? element : false;\n return didFind;\n }, checkBounds: function () {\n var w = this.game.windowSize.width;\n var h = this.game.windowSize.height;\n var rightBound = this.pos.x + this.sheet.rect.size.width / 2;\n var bottomBound = this.pos.y + this.sheet.rect.size.height / 2;\n if (rightBound > w)\n this.pos.x = 0; else if (this.pos.x < 0)\n this.pos.x = w - this.sheet.rect.size.width / 2;\n if (bottomBound > h)\n this.pos.y = 0; else if (this.pos.y < 0)\n this.pos.y = h - this.sheet.rect.size.height / 2;\n }, destroy: function () {\n this.sheet.destroy();\n }\n });\n var LaserBullet = new Class({\n Extends: Bullet, initialize: function () {\n Bullet.prototype.initialize.apply(this, arguments);\n this.vel = new Vector(750, 750);\n this.lastDrawPos = this.pos.cp();\n }, initCanvas: function () {\n var s = Math.max(GameGlobals.laserImage.width, GameGlobals.laserImage.height);\n this.sheet = new Sheet(new Rect(0, 0, s, s));\n }, update: function (tdelta) {\n Bullet.prototype.update.apply(this, arguments);\n }, draw: function () {\n this.sheet.drawLaser(this.pos, this.dir);\n this.lastDrawPos = this.pos.cp();\n }, checkBounds: function () {\n var w = this.game.windowSize.width;\n var h = this.game.windowSize.height;\n var rightBound = this.pos.x + this.sheet.rect.size.width / 2;\n var bottomBound = this.pos.y + this.sheet.rect.size.height / 2;\n if (rightBound > w || this.pos.x < 0)\n this.outOfBounds = true;\n if (bottomBound > h || this.pos.y < 0)\n this.outOfBounds = true;\n }, destroy: function () {\n this.sheet.destroy();\n }\n });\n GameGlobals.laserImage = document.createElement('img');\n GameGlobals.laserImage.src = GameGlobals.path('css/gfx/kickass/laser.png');\n var Explosion = new Class({\n initialize: function (pos, element) {\n this.bornAt = now();\n this.pos = pos.cp();\n }, update: function (tdelta) {\n }, checkBounds: function () {\n }, destroy: function () {\n }\n });\n var ParticleExplosion = new Class({\n Extends: Explosion, initialize: function (pos, element) {\n Explosion.prototype.initialize.apply(this, arguments);\n this.particleVel = new Vector(150, 0);\n this.particles = [];\n this.generateParticles();\n this.sheet = new Sheet(new Rect(pos.x, pos.y, 250, 250));\n }, update: function (tdelta) {\n for (var i = 0, particle; particle = this.particles[i]; i++)\n particle.pos.add(particle.vel.mulNew(tdelta).mul(random(0.5, 1.0)).setAngle(particle.dir.angle()));\n this.sheet.clear();\n this.sheet.drawExplosion(this.particles);\n }, generateParticles: function () {\n for (var i = 0, j = !GameGlobals.hasCanvas ? 10 : 40; i < j; i++) {\n this.particles.push({\n dir: (new Vector(random(0, 20) - 10, random(0, 20) - 10)).normalize(),\n vel: this.particleVel.cp(),\n pos: new Vector(0, 0),\n color: ['yellow', 'red'][random(0, 1)]\n });\n }\n }, checkBounds: function () {\n var right = this.sheet.rect.getRight();\n var bottom = this.sheet.rect.getBottom();\n var w = this.game.windowSize.width;\n var h = this.game.windowSize.height;\n if (right > w)\n this.pos.x -= right - w;\n if (bottom > h)\n this.pos.y -= bottom - h;\n this.sheet.setPosition(this.pos);\n }, destroy: function () {\n this.sheet.destroy();\n }\n });\n var MegaParticleExplosion = new Class({\n Extends: ParticleExplosion, initialize: function (pos, element) {\n Explosion.prototype.initialize.apply(this, arguments);\n this.particleVel = new Vector(200, 0);\n this.particles = [];\n this.generateParticles();\n this.sheet = new Sheet(new Rect(pos.x, pos.y, 500, 500));\n this.ttl = 2000;\n this.generationDelay = 0.6;\n this.generationTimes = 2;\n this.nextGenerate = this.generationDelay;\n }, update: function (tdelta) {\n this.nextGenerate -= tdelta;\n if (this.nextGenerate <= 0 && this.generationTimes > 0) {\n this.nextGenerate = this.generationDelay;\n this.generateParticles();\n this.generationTimes--;\n }\n ParticleExplosion.prototype.update.call(this, tdelta);\n }\n });\n var SplitExplosion = new Class({\n Extends: Explosion, initialize: function (pos, element) {\n if (!element) return;\n Explosion.prototype.initialize.apply(this, arguments);\n this.element = element;\n this.fx = new Fx();\n this.fx.addListener(this);\n this.start();\n }, update: function (tdelta) {\n if (!this.element) return;\n this.fx.update();\n }, set: function (key, value) {\n if (key == 'opacity') {\n }\n }, start: function () {\n var pieces = this.createClones();\n var left = pieces[0], right = pieces[1];\n var lT = 'rotate(-' + random(30, 50) + 'deg) translate(-100px, 40px)';\n var rT = 'rotate(' + random(30, 50) + 'deg) translate(100px, 40px)';\n setStyles(left, {'transform': lT});\n setStyles(right, {'transform': rT});\n this.left = left;\n this.right = right;\n this.fx.add('opacity', {start: 1, end: 0.5, duration: 500});\n }, createClones: function () {\n var coords = getRect(this.element);\n var leftContainer = this.createContainer(coords);\n var rightContainer = this.createContainer(coords);\n var left = cloneElement(this.element);\n var right = cloneElement(this.element);\n addClass(left, 'KICKASSELEMENT');\n addClass(right, 'KICKASSELEMENT');\n var styles = {margin: 0, overflow: 'hidden'};\n setStyles(left, styles);\n setStyles(right, styles);\n leftContainer.appendChild(left);\n rightContainer.appendChild(right);\n rightContainer.style.left = coords.left + coords.width / 2 + 'px';\n rightContainer.scrollLeft += coords.width / 2;\n this.element.style.opacity = 0;\n this.element.style.visibility = 'hidden';\n this.element.style.display = 'none';\n return each([leftContainer, rightContainer], function (el) {\n el.style.transition = 'transform 500ms ease-in';\n });\n }, createContainer: function (coords) {\n var ret = document.createElement('div');\n setStyles(ret, {\n position: 'absolute',\n left: coords.left,\n top: coords.top,\n width: coords.width * 0.5,\n height: coords.height,\n overflow: 'hidden'\n });\n getAppContainerElement().appendChild(ret);\n return ret;\n }, destroy: function () {\n try {\n this.left.parentNode.removeChild(this.left);\n this.right.parentNode.removeChild(this.right);\n this.element.parentNode.removeChild(this.element);\n } catch (e) {\n }\n }\n });\n var Weapons = {\n 1: {name: 'Cannon', id: 'cannon', cannonClass: BallCannon},\n 2: {name: 'Laser', id: 'laser', cannonClass: LaserCannon}\n };\n var WeaponMap = {'cannon': Weapons[1], 'laser': Weapons[2]};\n var SheetCanvas = new Class({\n initialize: function (rect) {\n this.canvas = document.createElement('canvas');\n this.canvas.className = 'KICKASSELEMENT';\n with (this.canvas.style) {\n position = 'absolute';\n zIndex = '1000000';\n }\n GameGlobals.kickass.registerElement(this.canvas);\n if (this.canvas.getContext)\n this.ctx = this.canvas.getContext('2d');\n this.rect = rect;\n this.angle = 0;\n this.updateCanvas();\n getAppContainerElement().appendChild(this.canvas);\n }, tracePoly: function (verts) {\n if (!verts[0]) return;\n this.ctx.save();\n this.ctx.translate(this.rect.size.width / 2, this.rect.size.height / 2);\n this.ctx.rotate(this.angle);\n this.ctx.beginPath();\n this.ctx.moveTo(verts[0].x, verts[0].y);\n for (var i = 0; i < verts.length; i++) {\n this.ctx.lineTo(verts[i].x, verts[i].y);\n }\n this.ctx.restore();\n }, setAngle: function (angle) {\n this.angle = angle;\n }, updateCanvas: function () {\n if (this.canvas.width != this.rect.size.width)\n this.canvas.width = this.rect.size.width;\n if (this.canvas.height != this.rect.size.height)\n this.canvas.height = this.rect.size.height;\n this.canvas.style.left = GameGlobals.kickass.scrollPos.x + (this.rect.pos.x - this.rect.size.width / 2) + 'px';\n this.canvas.style.top = GameGlobals.kickass.scrollPos.y + (this.rect.pos.y - this.rect.size.height / 2) + 'px';\n }, drawLine: function (xFrom, yFrom, xTo, yTo) {\n this.ctx.save();\n this.ctx.translate(this.rect.size.width / 2, this.rect.size.height / 2);\n this.ctx.beginPath();\n this.ctx.moveTo(xFrom, yFrom);\n this.ctx.lineTo(xTo, yTo);\n this.ctx.closePath();\n this.ctx.stroke();\n this.ctx.restore();\n }, drawCircle: function (radius, pos) {\n pos = pos || {x: 0, y: 0};\n this.ctx.save();\n this.ctx.translate(this.rect.size.width / 2, this.rect.size.height / 2);\n if (pos)\n this.ctx.translate(pos.x, pos.y);\n this.ctx.beginPath();\n this.ctx.arc(0, 0, radius, 0, Math.PI * 2, true);\n this.ctx.fill();\n this.ctx.closePath();\n this.ctx.restore();\n }, drawRect: function (x, y, w, h) {\n this.ctx.save();\n this.ctx.translate(this.rect.size.width / 2, this.rect.size.height / 2);\n this.ctx.translate(x, y);\n this.ctx.fillRect(x, y, w, h);\n this.ctx.restore();\n this.ctx.fill();\n }, drawImageFull: function (image) {\n this.ctx.drawImage(image, 0, 0, this.rect.size.width, this.rect.size.height);\n }, drawImage: function (image, x, y) {\n this.ctx.save();\n this.ctx.translate(this.rect.size.width / 2 + x, this.rect.size.height / 2 + y);\n this.ctx.rotate(this.angle);\n this.ctx.drawImage(image, 0, -11);\n this.ctx.restore();\n }, setFillColor: function (color) {\n this.ctx.fillStyle = color;\n }, setStrokeColor: function (color) {\n this.ctx.strokeStyle = color;\n }, setLineWidth: function (width) {\n this.ctx.lineWidth = width;\n }, fillPath: function () {\n this.ctx.fill();\n }, strokePath: function () {\n this.ctx.stroke();\n }, clear: function () {\n this.ctx.clearRect(0, 0, this.rect.size.width, this.rect.size.height);\n }, destroy: function () {\n GameGlobals.kickass.unregisterElement(this.canvas);\n this.canvas.parentNode.removeChild(this.canvas);\n }\n });\n var Sheet = new Class({\n initialize: function (rect) {\n this.rect = rect;\n this.drawer = new SheetCanvas(rect);\n }, clear: function () {\n this.drawer.clear();\n }, setPosition: function (pos) {\n this.rect.pos = pos.cp();\n this.drawer.rect = this.rect;\n this.drawer.updateCanvas();\n }, setAngle: function (angle) {\n this.drawer.setAngle(angle);\n }, drawPlayer: function (verts) {\n this.drawer.setFillColor('white');\n this.drawer.setStrokeColor('black');\n this.drawer.setLineWidth(1.5);\n this.drawer.tracePoly(verts);\n this.drawer.fillPath();\n this.drawer.tracePoly(verts);\n this.drawer.strokePath();\n }, drawBrokenPlayer: function (verts, lineOffsets) {\n this.drawer.setStrokeColor('black');\n this.drawer.setLineWidth(1.5);\n for (var i = 1, vert, lastVert = verts[0]; vert = verts[i]; i++, lastVert = vert) {\n var o = lineOffsets[i - 1];\n this.drawer.drawLine(lastVert.x + o.pos.x, lastVert.x + o.pos.y, vert.x + o.pos.x, vert.y + o.pos.y);\n }\n }, drawFlames: function (flames, angle) {\n this.drawer.setLineWidth(1.5);\n this.drawer.setFillColor('red');\n this.drawer.tracePoly(flames.r);\n this.drawer.fillPath();\n this.drawer.setFillColor('yellow');\n this.drawer.tracePoly(flames.y);\n this.drawer.fillPath();\n }, drawBullet: function () {\n this.drawer.setFillColor(GameGlobals.bulletColor);\n this.drawer.drawCircle(2.5);\n }, drawExplosion: function (particles) {\n for (var i = 0, particle; particle = particles[i]; i++) {\n this.drawer.setFillColor(particle.color);\n this.drawer.drawRect(particle.pos.x, particle.pos.y, 3, 3);\n }\n }, drawFace: function (face) {\n this.drawer.drawImageFull(face);\n }, drawLaser: function (pos, dir) {\n this.clear();\n this.setPosition(pos);\n this.drawer.setAngle(dir.angle());\n this.drawer.drawImage(GameGlobals.laserImage, 0, 0);\n }, transformToSheetCoordinates: function (vec) {\n var ret = vec.cp().sub(new Vector(this.rect.size.width / 2, this.rect.size.height / 2));\n return ret;\n }, destroy: function () {\n this.drawer.destroy();\n }\n });\n var namespace = getGlobalNamespace();\n\n var initKickAss = function () {\n // If an instance of KickAss is already present, we add a player\n if (!namespace.KICKASSGAME) {\n if (namespace.KICKASS_SITE_KEY) {\n var mySite = new MySite(namespace.KICKASS_SITE_KEY);\n mySite.load(function (ok) {\n namespace.KICKASSGAME = GameGlobals.kickass = new KickAss({\n mySite: ok ? mySite : false\n });\n\n namespace.KICKASSGAME.begin();\n });\n } else {\n namespace.KICKASSGAME = GameGlobals.kickass = new KickAss();\n namespace.KICKASSGAME.begin();\n }\n } else {\n namespace.KICKASSGAME.addPlayer();\n }\n };\n\n if (namespace.LAZYLOAD_KICKASS) {\n window.startBrowserBlaster = initKickAss;\n } else {\n initKickAss();\n }\n\n function getAppContainerElement() {\n if (namespace.KICKASS_CONTAINER_ELEMENT) {\n return document.getElementById(namespace.KICKASS_CONTAINER_ELEMENT);\n } else {\n return document.body;\n }\n }\n})(typeof exports != 'undefined' ? exports : window);"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"../../../js/plugins/aplayer.js","names":["RightMenuAplayer","playStatus","APlayer","fn","undefined","player","setAPlayerObject","observer","setAPlayerObserver","meting","document","querySelectorAll","length","forEach","item","index","meta","id","volantis","GLOBAL_CONFIG","plugins","aplayer","updateTitle","on","e","updateAPlayerControllerStatus","status","onUpdateAPlayerVolume","volumeBarWrap","getElementsByClassName","children","volumeBar","thumbMove","updateAPlayerVolume","thumbUp","classList","remove","removeEventListener","addEventListener","event","stopPropagation","add","error","console","log","percentage","clientX","changedTouches","getBoundingClientRect","left","clientWidth","Math","max","min","volume","style","width","audio","paused","checkAPlayer","toggle","skipBack","play","skipForward","percent","list","obj","audios","innerHTML","title","aplayerBackward","aplayerToggle","aplayerForward","Object","freeze","requestAnimationFrame"],"sources":["js/plugins/aplayer.js"],"mappings":"AAGA,MAAMA,iBAAmB,MACvB,IAAIC,EACJ,MAAMC,EAAU,CAAC,EACXC,EAAK,CAEXA,aAAkB,UACGC,IAAfH,QAA+CG,IAAnBF,EAAQG,OACtCF,EAAGG,wBAC2BF,IAArBF,EAAQK,UACjBJ,EAAGK,oBACL,EAIFL,iBAAsB,KACpB,IAAIM,EAASC,SAASC,iBAAiB,qBAClB,GAAjBF,EAAOG,SACTH,EAASC,SAASC,iBAAiB,cAErCT,EAAQG,YAASD,EACjBK,EAAOI,SAAQ,CAACC,EAAMC,KAChBD,EAAKE,KAAKC,IAAMC,SAASC,cAAcC,QAAQC,QAAQJ,IAAMH,EAAKO,cAA8BjB,IAAnBF,EAAQG,SACvFH,EAAQG,OAASS,EAAKO,QACtBlB,EAAGK,qBACHL,EAAGmB,cACL,GACA,EAIJnB,mBAAwB,KACtB,IACED,EAAQG,OAAOkB,GAAG,QAAQ,SAAUC,GAClCrB,EAAGsB,8BAA8BD,GACjCtB,EAAQwB,OAAS,MACnB,IACAxB,EAAQG,OAAOkB,GAAG,SAAS,SAAUC,GACnCrB,EAAGsB,8BAA8BD,GACjCtB,EAAQwB,OAAS,OACnB,IACAxB,EAAQG,OAAOkB,GAAG,gBAAgB,SAAUC,GAC1CrB,EAAGwB,sBAAsBH,EAC3B,IACAtB,EAAQG,OAAOkB,GAAG,aAAa,SAAUC,GACvCrB,EAAGmB,YAAYE,EACjB,IAGAtB,EAAQ0B,cAAgBlB,SAASmB,uBAAuB,cAAc,GAAGC,SAAS,GAClF5B,EAAQ6B,UAAY7B,EAAQ0B,cAAcE,SAAS,GAEnD,MAAME,EAAaR,IACjBrB,EAAG8B,oBAAoBT,EAAE,EAGrBU,EAAWV,IACftB,EAAQ0B,cAAcO,UAAUC,OAAO,kCACvC1B,SAAS2B,oBAAoB,UAAWH,GACxCxB,SAAS2B,oBAAoB,YAAaL,G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OAAOuD,QACjB,CAAE,MAAOlB,GACPC,QAAQC,IAAIF,EACd,GAIFvC,gBAAqB,KACnBA,EAAGwD,eACH,IACEzD,EAAQG,OAAOwD,WACf3D,EAAQG,OAAOyD,MACjB,CAAE,MAAOpB,GACPC,QAAQC,IAAIF,EACd,GAIFvC,eAAoB,KAClBA,EAAGwD,eACH,IACEzD,EAAQG,OAAO0D,cACf7D,EAAQG,OAAOyD,MACjB,CAAE,MAAOpB,GACPC,QAAQC,IAAIF,EACd,GAIFvC,cAAoB6D,IAClB7D,EAAGwD,eACH,IACEzD,EAAQG,OAAOiD,OAAOU,EACxB,CAAE,MAAOtB,GACPC,QAAQC,IAAIF,EACd,GAIFvC,YAAiB,KACfA,EAAGwD,eACH,IACE,MAAM5C,EAAQb,EAAQG,OAAO4D,KAAKlD,MAC5BmD,EAAMhE,EAAQG,OAAO4D,KAAKE,OAAOpD,GACvCL,SAASmB,uBAAuB,mBAAmB,GAAGuC,UAAYF,EAAIG,KACxE,CAAE,MAAO3B,GAET,IAGF,MAAO,CACLiB,aAAcxD,EAAGwD,aACjBW,gBAAiBnE,EAAGmE,gBACpBC,cAAepE,EAAGoE,cAClBC,eAAgBrE,EAAGqE,eACnBtE,QAASA,EAEZ,EAhLwB,GAkLzBuE,OAAOC,OAAO1E,kBAEdkB,SAASyD,uBAAsB,KAC7B3E,iBAAiB2D,cAAc","ignoreList":[],"sourcesContent":["/**\n * 右键音乐\n * */\nconst RightMenuAplayer = (() => {\n let playStatus; // 播放器状态\n const APlayer = {}; // 右键音乐所控制的播放器\n const fn = {};\n\n fn.checkAPlayer = () => {\n if (playStatus === undefined || APlayer.player === undefined) {\n fn.setAPlayerObject();\n } else if (APlayer.observer === undefined) {\n fn.setAPlayerObserver();\n }\n }\n\n // 设置全局播放器所对应的 aplyer 对象\n fn.setAPlayerObject = () => {\n let meting = document.querySelectorAll('.footer meting-js');\n if (meting.length == 0) {\n meting = document.querySelectorAll('meting-js');\n }\n APlayer.player = undefined;\n meting.forEach((item, index) => {\n if (item.meta.id == volantis.GLOBAL_CONFIG.plugins.aplayer.id && item.aplayer && APlayer.player === undefined) {\n APlayer.player = item.aplayer;\n fn.setAPlayerObserver();\n fn.updateTitle();\n }\n });\n }\n\n // 事件监听\n fn.setAPlayerObserver = () => {\n try {\n APlayer.player.on('play', function (e) {\n fn.updateAPlayerControllerStatus(e);\n APlayer.status = 'play';\n });\n APlayer.player.on('pause', function (e) {\n fn.updateAPlayerControllerStatus(e);\n APlayer.status = 'pause';\n });\n APlayer.player.on('volumechange', function (e) {\n fn.onUpdateAPlayerVolume(e);\n });\n APlayer.player.on('loadstart', function (e) {\n fn.updateTitle(e);\n });\n\n // 监听音量手势\n APlayer.volumeBarWrap = document.getElementsByClassName('nav volume')[0].children[0];\n APlayer.volumeBar = APlayer.volumeBarWrap.children[0];\n\n const thumbMove = (e) => {\n fn.updateAPlayerVolume(e);\n };\n\n const thumbUp = (e) => {\n APlayer.volumeBarWrap.classList.remove('aplayer-volume-bar-wrap-active');\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n fn.updateAPlayerVolume(e);\n };\n\n APlayer.volumeBarWrap.addEventListener('mousedown', (event) => {\n event.stopPropagation();\n APlayer.volumeBarWrap.classList.add('aplayer-volume-bar-wrap-active');\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n\n APlayer.volumeBarWrap.addEventListener('click', (event) => {\n event.stopPropagation();\n });\n\n fn.updateAPlayerControllerStatus();\n fn.onUpdateAPlayerVolume();\n APlayer.observer = true;\n } catch (error) {\n console.log(error);\n APlayer.observer = undefined;\n }\n }\n\n fn.updateAPlayerVolume = (e) => {\n let percentage = ((e.clientX || e.changedTouches[0].clientX) -\n APlayer.volumeBar.getBoundingClientRect().left) / APlayer.volumeBar.clientWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n APlayer.player.volume(percentage);\n }\n\n fn.onUpdateAPlayerVolume = () => {\n try {\n APlayer.volumeBar.children[0].style.width = APlayer.player.audio.volume * 100 + '%';\n } catch (error) {\n console.log(error);\n }\n }\n\n // 更新控制器状态\n fn.updateAPlayerControllerStatus = () => {\n try {\n if (APlayer.player.audio.paused) {\n playStatus = 'pause';\n document.getElementsByClassName('nav toggle')[0].children[0].classList.add('fa-play');\n document.getElementsByClassName('nav toggle')[0].children[0].classList.remove('fa-pause');\n } else {\n playStatus = 'play';\n document.getElementsByClassName('nav toggle')[0].children[0].classList.remove('fa-play');\n document.getElementsByClassName('nav toggle')[0].children[0].classList.add('fa-pause');\n }\n } catch (error) {\n console.log(error);\n }\n }\n\n // 播放/暂停\n fn.aplayerToggle = () => {\n fn.checkAPlayer();\n try {\n APlayer.player.toggle();\n } catch (error) {\n console.log(error);\n }\n }\n\n // 上一曲\n fn.aplayerBackward = () => {\n fn.checkAPlayer();\n try {\n APlayer.player.skipBack();\n APlayer.player.play();\n } catch (error) {\n console.log(error);\n }\n }\n\n // 下一曲\n fn.aplayerForward = () => {\n fn.checkAPlayer();\n try {\n APlayer.player.skipForward();\n APlayer.player.play();\n } catch (error) {\n console.log(error);\n }\n }\n\n // 调节音量\n fn.aplayerVolume = (percent) => {\n fn.checkAPlayer();\n try {\n APlayer.player.volume(percent);\n } catch (error) {\n console.log(error);\n }\n }\n\n // 更新音乐标题\n fn.updateTitle = () => {\n fn.checkAPlayer();\n try {\n const index = APlayer.player.list.index;\n const obj = APlayer.player.list.audios[index];\n document.getElementsByClassName('nav music-title')[0].innerHTML = obj.title;\n } catch (error) {\n //console.log(error);\n }\n }\n\n return {\n checkAPlayer: fn.checkAPlayer,\n aplayerBackward: fn.aplayerBackward,\n aplayerToggle: fn.aplayerToggle,\n aplayerForward: fn.aplayerForward,\n APlayer: APlayer\n }\n})()\n\nObject.freeze(RightMenuAplayer);\n\nvolantis.requestAnimationFrame(() => {\n RightMenuAplayer.checkAPlayer();\n});\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"../../../js/plugins/parallax.js","names":["Parallax","options","speed","zIndex","fade","slidein","slider","mirrors","length","opac","parseFloat","style","opacity","setTimeout","mirror","remove","shift","start","document","createElement","classList","add","visibility","position","top","left","overflow","window","appendChild","src","alt","mirrorItem","push","addEventListener","update","init","loadDimensions","wH","documentElement","clientHeight","wW","clientWidth","getScrollTop","scrollPos","pageYOffset","compatMode","scrollTop","body","lastPosition","loop","yoffset","winScrollTop","sT","Math","max","sL","scrollLeft","overScroll","min","loadScrollPosition","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","refreshItem","aspectRatio","naturalWidth","naturalHeight","aspect","boxWidth","boxHeight","boxOffsetTop","boxOffsetLeft","boxOffsetBottom","winHeight","maxOffset","minOffset","imageHeightMin","imageOffsetMin","margin","imageWidth","imageHeight","offsetBaseTop","offsetLeft","renderItem","scrollBottom","mirrorTop","mirrorLeft","offsetTop","transform","height","width","maxWidth","forEach","e"],"sources":["js/plugins/parallax.js"],"mappings":"AAAA,IAAIA,SAAW,CACfA,QAAmB,CAAC,GACpBA,SAASC,QAAQC,MAAQ,IACzBF,SAASC,QAAQE,QAAU,IAC3BH,SAASC,QAAQG,KAAO,KACxBJ,SAASK,QAAU,KACjB,IAAIC,EAASN,SAASO,QAAQ,GAAGD,OAC7BN,SAASO,QAAQC,QAAU,IAC7BF,EAASN,SAASO,QAAQ,GAAGD,QAE/B,IAAIG,EAAOC,WAAWJ,EAAOK,MAAMC,SACtB,IAATH,EACET,SAASO,QAAQC,QAAU,GAC7BC,GAAc,GACdH,EAAOK,MAAMC,QAAUH,EACvBI,WAAWb,SAASK,QAASL,SAASC,QAAQG,KAAO,KAErDE,EAAOK,MAAMC,QAAU,EAGrBZ,SAASO,QAAQC,QAAU,IAC7BR,SAASO,QAAQ,GAAGO,OAAOC,SAC3Bf,SAASO,QAAQS,QAErB,EAEFhB,SAASiB,MAAQ,KACf,IAAIH,EAASI,SAASC,cAAc,OACpCL,EAAOM,UAAUC,IAAI,mBACrBP,EA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SAASC,QAAQ+E,YAAcJ,EACxC5E,SAASC,QAAQgF,cAAiBJ,EAAiBC,EAAS,EAAK,EACnE,EAEF9E,SAASmF,WAAa,CAACrE,EAAQR,KAC7B,MAAMwC,EAAY9C,SAASoD,GACrBI,EAAaxD,SAASuD,GACtB6B,EAAetC,EAAY9C,SAASqC,GAExCrC,SAASC,QAAQuE,gBAAkB1B,GACnC9C,SAASC,QAAQqE,cAAgBc,GAEjCpF,SAASC,QAAQqB,WAAa,UAC9BtB,SAASC,QAAQoF,UAAYrF,SAASC,QAAQqE,aAAexB,EAC7D9C,SAASC,QAAQqF,WAAatF,SAASC,QAAQsE,cAAgBf,EAC/DxD,SAASC,QAAQsF,UACfvF,SAASC,QAAQgF,cACjBjF,SAASC,QAAQoF,WAAa,EAAIrF,SAASC,QAAQC,QAErDF,SAASC,QAAQqB,WAAa,SAEhCR,EAAOH,MAAM6E,UACX,eACAxF,SAASC,QAAQqF,WACjB,OACAtF,SAASC,QAAQoF,UACjB,WACFvE,EAAOH,MAAMW,WAAatB,SAASC,QAAQqB,WAC3CR,EAAOH,MAAM8E,OAASzF,SAASC,QAAQoE,UAAY,KACnDvD,EAAOH,MAAM+E,MAAQ1F,SAASC,QAAQmE,SAAW,KAEjD9D,EAAOK,MAAM6E,UACX,eACAxF,SAASC,QAAQiF,WACjB,OACAlF,SAASC,QAAQsF,UACjB,WACFjF,EAAOK,MAAMY,SAAW,WACxBjB,EAAOK,MAAM8E,OAASzF,SAASC,QAAQ+E,YAAc,KACrD1E,EAAOK,MAAM+E,MAAQ1F,SAASC,QAAQ8E,WAAa,KACnDzE,EAAOK,MAAMgF,SAAW,MAAM,EAEhC3F,SAASkC,OAAS,KACXlC,SAASO,SAGdP,SAASO,QAAQqF,SAASC,IACxB7F,SAAS+D,YAAY8B,EAAEvF,QACvBN,SAASmF,WAAWU,EAAE/E,OAAQ+E,EAAEvF,OAAO,GACvC","ignoreList":[],"sourcesContent":["let Parallax = {};\nParallax.options = {};\nParallax.options.speed = 0.25;\nParallax.options.zIndex = -100;\nParallax.options.fade = 1500;\nParallax.slidein = () => {\n let slider = Parallax.mirrors[0].slider;\n if (Parallax.mirrors.length >= 2) {\n slider = Parallax.mirrors[1].slider;\n }\n var opac = parseFloat(slider.style.opacity);\n if (opac !== 1) {\n if (Parallax.mirrors.length >= 2) {\n opac = opac + 0.1;\n slider.style.opacity = opac;\n setTimeout(Parallax.slidein, Parallax.options.fade / 10);\n }else{\n slider.style.opacity = 1;\n }\n } else {\n if (Parallax.mirrors.length >= 2) {\n Parallax.mirrors[0].mirror.remove();\n Parallax.mirrors.shift();\n }\n }\n};\nParallax.start = () => {\n let mirror = document.createElement(\"div\");\n mirror.classList.add(\"parallax-mirror\");\n mirror.style.visibility = \"hidden\";\n mirror.style.zIndex = Parallax.options.zIndex;\n mirror.style.position = \"fixed\";\n mirror.style.top = 0;\n mirror.style.left = 0;\n mirror.style.overflow = \"hidden\";\n Parallax.window.appendChild(mirror);\n let slider = document.createElement(\"img\");\n slider.src = Parallax.options.src;\n slider.alt = \"parallax\";\n slider.classList.add(\"parallax-slider\");\n slider.style.opacity = 0;\n mirror.appendChild(slider);\n if (!Parallax.mirrors) {\n Parallax.mirrors = [];\n }\n let mirrorItem = {};\n mirrorItem.mirror = mirror;\n mirrorItem.slider = slider;\n Parallax.mirrors.push(mirrorItem);\n Parallax.slidein();\n slider.addEventListener(\n \"load\",\n function () {\n Parallax.update();\n },\n false\n );\n};\nParallax.init = () => {\n function loadDimensions() {\n Parallax.wH = document.documentElement.clientHeight;\n Parallax.wW = document.documentElement.clientWidth;\n }\n function getScrollTop() {\n var scrollPos;\n if (window.pageYOffset) {\n scrollPos = window.pageYOffset;\n } else if (document.compatMode && document.compatMode != \"BackCompat\") {\n scrollPos = document.documentElement.scrollTop;\n } else if (document.body) {\n scrollPos = document.body.scrollTop;\n }\n return scrollPos;\n }\n function loadScrollPosition() {\n const winScrollTop = getScrollTop();\n Parallax.sT = Math.max(0, winScrollTop);\n Parallax.sL = Math.max(0, document.body.scrollLeft);\n Parallax.overScroll = Math.min(winScrollTop, 0);\n }\n window.addEventListener(\n \"resize\",\n function () {\n loadDimensions();\n Parallax.update();\n },\n false\n );\n loadDimensions();\n let lastPosition = -1;\n (function loop() {\n const yoffset = getScrollTop();\n if (lastPosition !== yoffset) {\n lastPosition = yoffset;\n loadScrollPosition();\n Parallax.update();\n }\n window.requestAnimationFrame =\n window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame;\n window.requestAnimationFrame(loop);\n })();\n};\n\nParallax.refreshItem = (slider) => {\n Parallax.options.aspectRatio =\n slider.naturalWidth / (slider.naturalHeight || 1);\n const aspect = Parallax.options.aspectRatio || 1;\n Parallax.options.boxWidth = Parallax.window.clientWidth;\n Parallax.options.boxHeight = Parallax.window.clientHeight;\n Parallax.options.boxOffsetTop = Parallax.window.scrollTop;\n Parallax.options.boxOffsetLeft = Parallax.window.scrollLeft;\n Parallax.options.boxOffsetBottom =\n Parallax.options.boxOffsetTop + Parallax.options.boxHeight;\n const winHeight = Parallax.wH;\n const maxOffset = Parallax.options.boxOffsetTop;\n const minOffset = Math.max(\n Parallax.options.boxOffsetTop + Parallax.options.boxHeight - winHeight,\n 0\n );\n const imageHeightMin =\n (Parallax.options.boxHeight +\n (maxOffset - minOffset) * (1 - Parallax.options.speed)) |\n 0;\n const imageOffsetMin =\n ((Parallax.options.boxOffsetTop - maxOffset) *\n (1 - Parallax.options.speed)) |\n 0;\n let margin;\n if (Parallax.options.boxWidth < imageHeightMin * aspect) {\n Parallax.options.imageWidth = (imageHeightMin * aspect) | 0;\n Parallax.options.imageHeight = imageHeightMin;\n Parallax.options.offsetBaseTop = imageOffsetMin;\n margin = Parallax.options.imageWidth - Parallax.options.boxWidth;\n Parallax.options.offsetLeft = (-margin / 2) | 0;\n } else {\n Parallax.options.imageWidth = Parallax.options.boxWidth;\n Parallax.options.imageHeight = (Parallax.options.boxWidth / aspect) | 0;\n Parallax.options.offsetLeft = 0;\n margin = Parallax.options.imageHeight - imageHeightMin;\n Parallax.options.offsetBaseTop = (imageOffsetMin - margin / 2) | 0;\n }\n};\nParallax.renderItem = (mirror, slider) => {\n const scrollTop = Parallax.sT;\n const scrollLeft = Parallax.sL;\n const scrollBottom = scrollTop + Parallax.wH;\n if (\n Parallax.options.boxOffsetBottom > scrollTop &&\n Parallax.options.boxOffsetTop <= scrollBottom\n ) {\n Parallax.options.visibility = \"visible\";\n Parallax.options.mirrorTop = Parallax.options.boxOffsetTop - scrollTop;\n Parallax.options.mirrorLeft = Parallax.options.boxOffsetLeft - scrollLeft;\n Parallax.options.offsetTop =\n Parallax.options.offsetBaseTop -\n Parallax.options.mirrorTop * (1 - Parallax.options.speed);\n } else {\n Parallax.options.visibility = \"hidden\";\n }\n mirror.style.transform =\n \"translate3d(\" +\n Parallax.options.mirrorLeft +\n \"px, \" +\n Parallax.options.mirrorTop +\n \"px, 0px)\";\n mirror.style.visibility = Parallax.options.visibility;\n mirror.style.height = Parallax.options.boxHeight + \"px\";\n mirror.style.width = Parallax.options.boxWidth + \"px\";\n\n slider.style.transform =\n \"translate3d(\" +\n Parallax.options.offsetLeft +\n \"px, \" +\n Parallax.options.offsetTop +\n \"px, 0px)\";\n slider.style.position = \"absolute\";\n slider.style.height = Parallax.options.imageHeight + \"px\";\n slider.style.width = Parallax.options.imageWidth + \"px\";\n slider.style.maxWidth = \"none\";\n};\nParallax.update = () => {\n if (!Parallax.mirrors) {\n return\n }\n Parallax.mirrors.forEach((e) => {\n Parallax.refreshItem(e.slider);\n Parallax.renderItem(e.mirror, e.slider);\n });\n};\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"../../../js/plugins/rightMenus.js","names":["RightMenus","defaultEvent","defaultGroup","messageRightMenu","volantis","GLOBAL_CONFIG","plugins","message","enable","rightmenu","corsAnywhere","rightmenus","options","urlRegx","imgRegx","initialMenu","fun","init","pjax","send","hideMenu","isReadModel","readMode","readClipboard","async","clipboardText","navigator","permissions","query","name","state","clipboard","readText","window","clipboardRead","writeClipText","text","writeText","then","Promise","resolve","catch","err","reject","writeClipImg","link","success","error","image","Image","crossOrigin","addEventListener","canvas","document","createElement","context","getContext","width","height","drawImage","toBlob","blob","write","ClipboardItem","e","src","insertAtCaret","elemt","value","startPos","selectionStart","endPos","selectionEnd","selection","focus","createRange","scrollTop","substring","length","rightMenuConfig","fn","_rightMenuWrapper","getElementById","_rightMenuContent","_rightMenuList","querySelectorAll","_rightMenuListWithHr","_readBkg","_menuMusic","_backward","querySelector","_toggle","_forward","globalData","mouseEvent","isInputBox","selectText","inputValue","isLink","linkUrl","isMediaLink","mediaLinkUrl","isImage","isArticle","pathName","isReadClipboard","isShowMusic","statusCheck","globalDataBackup","Object","assign","initEvent","elementAppend","contextmenu","menuEvent","parentNode","removeChild","readBkg","className","id","body","appendChild","menuPosition","event","mouseClientX","clientX","mouseClientY","clientY","screenWidth","documentElement","clientWidth","screenHeight","clientHeight","style","display","menuControl","menuWidth","offsetWidth","menuHeight","offsetHeight","showLeft","showTop","left","top","notice","menuNotic","console","globalDataSet","forEach","item","nodeName","firstElementChild","groupName","getAttribute","itemEvent","articleShowLink","every","method","handle","start","elementHrItem","hide","nextElementSibling","getSelection","toString","target","tagName","toLowerCase","href","test","currentSrc","location","pathname","aplayer","RightMenuAplayer","undefined","APlayer","player","musicAlwaysShow","status","oncontextmenu","ctrlKey","stopPropagation","preventDefault","removeEventListener","eventName","RightMenusFunction","debug","VolantisApp","icon","iconPrefix","time","onclick","aplayerBackward","aplayerToggle","aplayerForward","NoticeRightMenu","localStorage","getItem","displayMode","setItem","copyText","utilWriteClipText","messageCopyright","copyLink","copyAll","select","copyPaste","result","copyCut","statrPos","inputStr","copyImg","hideMessage","printMode","question","printHtml","DOMController","setAttribute","removeList","setStyleList","setTimeout","print","innerHTML","reload","ScrollReveal","clean","setStyle","fadeToggleList","toggleClassList","backgroundColor","hasClass","freeze","requestAnimationFrame","readyState"],"sources":["js/plugins/r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AgB,CAACrC,SAASqC,cAAc,aAAc,oBAClG,CAACrC,SAASqC,cAAc,MAAO,kBAAmB,CAACrC,SAASqC,cAAc,SAAU,aACpF,CAACrC,SAASqC,cAAc,YAAa,cAAe,CAACrC,SAASqC,cAAc,uBAAwB,eAEtG+H,cAAcU,SAAS,qBAAsB,SAAU,UACvD/N,SAASiB,iBAAuC0J,IAAzB3K,SAASiB,cAAoCjB,SAASiB,YACzEjB,SAASiB,aACPrB,WAAWG,kBAAkByL,YAAYrL,QAAQ,OAAQ,wBAAyB,CACpF+N,gBAAiB,yBACjBzC,KAAM9G,EAAgBnE,QAAQkL,WAAa,kBAC3CS,YAAa,EACbR,KAAM,MAER1I,SAASqC,cAAc,WAAW8F,oBAAoB,QAASxG,EAAG1D,UAClE+B,SAASqC,cAAc,WAAWvC,iBAAiB,SAAUwE,IACvD8F,cAAcc,SAAS5G,EAAM0C,OAAQ,gBACvCrF,EAAG1D,UACL,MAGF+B,SAASqC,cAAc,WAAW8F,oBAAoB,QAASxG,EAAG1D,UAClE+B,SAASqC,cAAc,SAAS8F,oBAAoB,QAASxG,EAAG1D,UAChEmM,cAAcU,SAAS,aAAc,UAAW,QAChDV,cAAcU,SAAS,qBAAsB,SAAU,cACvDV,cAAcU,SAAS,YAAa,UAAW,SACjD,EAGK,CACLlN,KAAM+D,EAAG+B,UACT3F,SAAU4D,EAAG5D,SACbE,SAAU0D,EAAG1D,SAEhB,EAjfgB,GAmfjBuF,OAAO2H,OAAOxO,YACdI,SAASqO,uBAAsB,KACD,YAAxBpL,SAASqL,WACX1O,WAAWe,cAEXsC,SAASF,iBAAiB,oBAAoB,WAC5CnD,WAAWe,aACb,GACF","ignoreList":[],"sourcesContent":["\nconst RightMenus = {\n defaultEvent: ['copyText', 'copyLink', 'copyPaste', 'copyAll', 'copyCut', 'copyImg', 'printMode', 'readMode'],\n defaultGroup: ['navigation', 'inputBox', 'seletctText', 'elementCheck', 'elementImage', 'articlePage'],\n messageRightMenu: volantis.GLOBAL_CONFIG.plugins.message.enable && volantis.GLOBAL_CONFIG.plugins.message.rightmenu.enable,\n corsAnywhere: volantis.GLOBAL_CONFIG.plugins.rightmenus.options.corsAnywhere,\n urlRegx: /^((https|http)?:\\/\\/)+[A-Za-z0-9]+\\.[A-Za-z0-9]+[\\/=\\?%\\-&_~`@[\\]\\':+!]*([^<>\\\"\\\"])*$/,\n imgRegx: /\\.(jpe?g|png|webp|svg|gif|jifi)(-|_|!|\\?|\\/)?.*$/,\n\n /**\n * 加载右键菜单\n */\n initialMenu: () => {\n RightMenus.fun.init();\n volantis.pjax.send(() => {\n RightMenus.fun.hideMenu();\n if (volantis.isReadModel) RightMenus.fun.readMode();\n })\n },\n\n /**\n * 读取剪切板\n * @returns text\n */\n readClipboard: async () => {\n let clipboardText;\n const result = await navigator.permissions.query({ name: 'clipboard-read' });\n switch (result.state) {\n case 'granted':\n case 'prompt':\n clipboardText = await navigator.clipboard.readText()\n break;\n default:\n window.clipboardRead = false;\n break;\n }\n return clipboardText;\n },\n\n /**\n * 写入文本到剪切板\n * @param {String} text\n */\n writeClipText: text => {\n return navigator.clipboard\n .writeText(text)\n .then(() => {\n return Promise.resolve()\n })\n .catch(err => {\n return Promise.reject(err)\n })\n },\n\n /**\n * 写入图片到剪切板\n * @param {*} link\n * @param {*} success\n * @param {*} error\n */\n writeClipImg: async (link, success, error) => {\n const image = new Image;\n image.crossOrigin = \"Anonymous\";\n image.addEventListener('load', () => {\n let canvas = document.createElement(\"canvas\");\n let context = canvas.getContext(\"2d\");\n canvas.width = image.width;\n canvas.height = image.height;\n context.drawImage(image, 0, 0);\n canvas.toBlob(blob => {\n navigator.clipboard.write([\n new ClipboardItem({ 'image/png': blob })\n ]).then(e => {\n success(e)\n }).catch(e => {\n error(e)\n })\n }, 'image/png')\n }, false)\n image.src = `${link}?(lll¬ω¬)~~`;\n },\n\n /**\n * 粘贴文本到剪切板\n * @param {*} elemt\n * @param {*} value\n */\n insertAtCaret: (elemt, value) => {\n const startPos = elemt.selectionStart,\n endPos = elemt.selectionEnd;\n if (document.selection) {\n elemt.focus();\n var sel = document.selection.createRange();\n sel.text = value;\n elemt.focus();\n } else {\n if (startPos || startPos == '0') {\n var scrollTop = elemt.scrollTop;\n elemt.value = elemt.value.substring(0, startPos) + value + elemt.value.substring(endPos, elemt.value.length);\n elemt.focus();\n elemt.selectionStart = startPos + value.length;\n elemt.selectionEnd = startPos + value.length;\n elemt.scrollTop = scrollTop;\n } else {\n elemt.value += value;\n elemt.focus();\n }\n }\n }\n}\n\n/**\n * 事件处理区域\n */\nRightMenus.fun = (() => {\n const rightMenuConfig = volantis.GLOBAL_CONFIG.plugins.rightmenus;\n\n const\n fn = {},\n _rightMenuWrapper = document.getElementById('rightmenu-wrapper'),\n _rightMenuContent = document.getElementById('rightmenu-content'),\n _rightMenuList = document.querySelectorAll('#rightmenu-content li.menuLoad-Content'),\n _rightMenuListWithHr = document.querySelectorAll('#rightmenu-content li, #rightmenu-content hr, #menuMusic'),\n _readBkg = document.getElementById('read_bkg'),\n _menuMusic = document.getElementById('menuMusic'),\n _backward = document.querySelector('#menuMusic .backward'),\n _toggle = document.querySelector('#menuMusic .toggle'),\n _forward = document.querySelector('#menuMusic .forward');\n\n // 公共数据\n let globalData = {\n mouseEvent: null,\n isInputBox: false,\n selectText: '',\n inputValue: '',\n isLink: false,\n linkUrl: '',\n isMediaLink: false,\n mediaLinkUrl: '',\n isImage: false,\n isArticle: false,\n pathName: '',\n isReadClipboard: true,\n isShowMusic: false,\n statusCheck: false\n }\n const globalDataBackup = Object.assign({}, globalData);\n\n /**\n * 初始化监听事件处理\n */\n fn.initEvent = () => {\n fn.elementAppend();\n fn.contextmenu();\n fn.menuEvent();\n }\n\n /**\n * 预置元素设定\n */\n fn.elementAppend = () => {\n // 阅读模式\n if (_readBkg) _readBkg.parentNode.removeChild(_readBkg);\n const readBkg = document.createElement(\"div\");\n readBkg.className = \"common_read_bkg common_read_hide\";\n readBkg.id = \"read_bkg\";\n window.document.body.appendChild(readBkg);\n }\n\n /**\n * 右键菜单位置设定\n * @param {*} event\n */\n fn.menuPosition = (event) => {\n try {\n let mouseClientX = event.clientX;\n let mouseClientY = event.clientY;\n let screenWidth = document.documentElement.clientWidth || document.body.clientWidth;\n let screenHeight = document.documentElement.clientHeight || document.body.clientHeight;\n\n _rightMenuWrapper.style.display = 'block';\n fn.menuControl(event);\n\n let menuWidth = _rightMenuContent.offsetWidth;\n let menuHeight = _rightMenuContent.offsetHeight;\n let showLeft = mouseClientX + menuWidth > screenWidth ? mouseClientX - menuWidth + 10 : mouseClientX;\n let showTop = mouseClientY + menuHeight > screenHeight ? mouseClientY - menuHeight + 10 : mouseClientY;\n showTop = mouseClientY + menuHeight > screenHeight && showTop < menuHeight && mouseClientY < menuHeight ?\n showTop + (screenHeight - menuHeight - showTop - 10) : showTop;\n _rightMenuWrapper.style.left = `${showLeft}px`;\n _rightMenuWrapper.style.top = `${showTop}px`;\n if (volantis.GLOBAL_CONFIG.plugins.message.rightmenu.notice) fn.menuNotic();\n } catch (error) {\n console.error(error);\n fn.hideMenu();\n return true;\n }\n return false;\n }\n\n /**\n * 菜单项控制\n * @param {*} event\n */\n fn.menuControl = (event) => {\n fn.globalDataSet(event);\n if (!!_menuMusic) _menuMusic.style.display = globalData.isShowMusic ? 'block' : 'none';\n _rightMenuList.forEach(item => {\n item.style.display = 'none';\n const nodeName = item.firstElementChild.nodeName;\n const groupName = item.firstElementChild.getAttribute('data-group');\n const itemEvent = item.firstElementChild.getAttribute('data-event');\n if (globalData.statusCheck || globalData.isArticle) {\n switch (groupName) {\n case 'inputBox':\n if (globalData.isInputBox) {\n item.style.display = 'block';\n if (itemEvent === 'copyCut' && !globalData.selectText) item.style.display = 'none';\n if (itemEvent === 'copyAll' && !globalData.inputValue) item.style.display = 'none';\n if (itemEvent === 'copyPaste' && !globalData.isReadClipboard) item.style.display = 'none';\n }\n break;\n case 'seletctText':\n if (!!globalData.selectText) item.style.display = 'block';\n break;\n case 'elementCheck':\n if (globalData.isLink || globalData.isMediaLink) item.style.display = 'block';\n break;\n case 'elementImage':\n if (globalData.isImage) item.style.display = 'block';\n break;\n case 'articlePage':\n if (globalData.isArticle) item.style.display = 'block';\n break;\n default:\n item.style.display = nodeName === 'A'\n ? globalData.isArticle && !globalData.statusCheck && rightMenuConfig.options.articleShowLink\n ? 'block'\n : 'none'\n : 'block';\n break;\n }\n } else if (nodeName === 'A' || RightMenus.defaultGroup.every(item => { return groupName !== item })) {\n item.style.display = 'block';\n }\n })\n\n // 执行外部事件\n volantis.mouseEvent = event;\n volantis.rightmenu.method.handle.start()\n\n // 过滤 HR 元素\n let elementHrItem = { item: null, hide: true };\n _rightMenuListWithHr.forEach((item) => {\n if (item.nodeName === \"HR\") {\n item.style.display = 'block';\n if (!elementHrItem.item) {\n elementHrItem.item = item;\n return;\n }\n if (elementHrItem.hide || elementHrItem.item.nextElementSibling.nodeName === \"hr\") {\n elementHrItem.item.style.display = 'none';\n }\n elementHrItem.item = item;\n elementHrItem.hide = true;\n } else {\n if (item.style.display === 'block' && elementHrItem.hide) {\n elementHrItem.hide = false;\n }\n }\n })\n if (!!elementHrItem.item && elementHrItem.hide) elementHrItem.item.style.display = 'none';\n }\n\n /**\n * 元素状态判断/全局数据设置\n * @param {*} event\n */\n fn.globalDataSet = (event) => {\n globalData = Object.assign({}, globalDataBackup);\n globalData.mouseEvent = event;\n globalData.selectText = window.getSelection().toString();\n\n // 判断是否为输入框\n if (event.target.tagName.toLowerCase() === 'input' || event.target.tagName.toLowerCase() === 'textarea') {\n globalData.isInputBox = true;\n globalData.inputValue = event.target.value;\n }\n\n // 判断是否允许读取剪切板\n if (globalData.isInputBox && window.clipboardRead === false) {\n globalData.isReadClipboard = false;\n }\n\n // 判断是否包含链接\n if (!!event.target.href && RightMenus.urlRegx.test(event.target.href)) {\n globalData.isLink = true;\n globalData.linkUrl = event.target.href;\n }\n\n // 判断是否包含媒体链接\n if (!!event.target.currentSrc && RightMenus.urlRegx.test(event.target.currentSrc)) {\n globalData.isMediaLink = true;\n globalData.mediaLinkUrl = event.target.currentSrc;\n }\n\n // 判断是否为图片地址\n if (globalData.isMediaLink && RightMenus.imgRegx.test(globalData.mediaLinkUrl)) {\n globalData.isImage = true;\n }\n\n // 判断是否为文章页面\n if (!!(document.querySelector('#post.article') || null)) {\n globalData.isArticle = true;\n globalData.pathName = window.location.pathname;\n }\n\n // 判断是否显示音乐控制器\n if (volantis.GLOBAL_CONFIG.plugins.aplayer?.enable\n && typeof RightMenuAplayer !== 'undefined'\n && RightMenuAplayer.APlayer.player !== undefined) {\n if (rightMenuConfig.options.musicAlwaysShow\n || RightMenuAplayer.APlayer.status === 'play'\n || RightMenuAplayer.APlayer.status === 'undefined') {\n globalData.isShowMusic = true;\n }\n }\n\n // 设定校验状态\n if (!!globalData.selectText || globalData.isInputBox || globalData.isLink || globalData.isMediaLink) {\n globalData.statusCheck = true;\n }\n }\n\n /**\n * 全局右键监听函数\n */\n fn.contextmenu = () => {\n window.document.oncontextmenu = (event) => {\n if (event.ctrlKey || document.body.offsetWidth <= 500) {\n fn.hideMenu();\n return true;\n }\n return fn.menuPosition(event);\n }\n\n _rightMenuWrapper.oncontextmenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n return false;\n }\n\n window.removeEventListener('blur', fn.hideMenu);\n window.addEventListener('blur', fn.hideMenu);\n document.body.removeEventListener('click', fn.hideMenu);\n document.body.addEventListener('click', fn.hideMenu);\n }\n\n /**\n * 菜单项事件处理函数\n */\n fn.menuEvent = () => {\n _rightMenuList.forEach(item => {\n let eventName = item.firstElementChild.getAttribute('data-event');\n const id = item.firstElementChild.getAttribute('id');\n const groupName = item.firstElementChild.getAttribute('data-group');\n if (item.firstElementChild.nodeName === \"A\") return;\n item.addEventListener('click', () => {\n try {\n if (RightMenus.defaultEvent.every(item => { return eventName !== item })) {\n if (groupName === 'seletctText') {\n RightMenusFunction[id](globalData.selectText)\n } else if (groupName === 'elementCheck') {\n RightMenusFunction[id](globalData.isLink ? globalData.linkUrl : globalData.mediaLinkUrl)\n } else if (groupName === 'elementImage') {\n RightMenusFunction[id](globalData.mediaLinkUrl)\n } else {\n RightMenusFunction[id]()\n }\n } else {\n fn[eventName]()\n }\n } catch (error) {\n if (volantis.GLOBAL_CONFIG.debug === \"rightMenus\") {\n console.error({\n id: id,\n error: error,\n globalData: globalData,\n groupName: groupName,\n eventName: eventName\n });\n }\n if (RightMenus.messageRightMenu) {\n VolantisApp.message('错误提示', error, {\n icon: rightMenuConfig.options.iconPrefix + ' fa-exclamation-square red',\n time: '15000'\n });\n }\n }\n })\n })\n\n if (_forward && _toggle && _forward) {\n _backward.onclick = (e) => {\n e.preventDefault();\n e.stopPropagation();\n RightMenuAplayer.aplayerBackward();\n }\n _toggle.onclick = (e) => {\n e.preventDefault();\n e.stopPropagation();\n RightMenuAplayer.aplayerToggle();\n }\n _forward.onclick = (e) => {\n e.preventDefault();\n e.stopPropagation();\n RightMenuAplayer.aplayerForward();\n }\n }\n }\n\n /**\n * 隐藏菜单显示\n */\n fn.hideMenu = () => {\n _rightMenuWrapper.style.display = null;\n _rightMenuWrapper.style.left = null;\n _rightMenuWrapper.style.top = null;\n }\n\n /**\n * 右键菜单覆盖提示\n */\n fn.menuNotic = () => {\n const NoticeRightMenu = localStorage.getItem('NoticeRightMenu') === 'true';\n if (RightMenus.messageRightMenu && !NoticeRightMenu)\n VolantisApp.message('右键菜单', '唤醒原系统菜单请使用:<kbd>Ctrl</kbd> + <kbd>右键</kbd>', {\n icon: rightMenuConfig.options.iconPrefix + ' fa-exclamation-square red',\n displayMode: 1,\n time: 9000\n }, () => {\n localStorage.setItem('NoticeRightMenu', 'true')\n });\n }\n\n fn.copyText = () => {\n VolantisApp.utilWriteClipText(globalData.selectText)\n .then(() => {\n if (RightMenus.messageRightMenu) {\n VolantisApp.messageCopyright();\n }\n }).catch(e => {\n if (RightMenus.messageRightMenu) {\n VolantisApp.message('系统提示', e, {\n icon: rightMenuConfig.options.iconPrefix + ' fa-exclamation-square red',\n displayMode: 1,\n time: 9000\n });\n }\n })\n }\n\n fn.copyLink = () => {\n VolantisApp.utilWriteClipText(globalData.linkUrl || globalData.mediaLinkUrl)\n .then(() => {\n if (RightMenus.messageRightMenu) {\n VolantisApp.messageCopyright();\n }\n }).catch(e => {\n if (RightMenus.messageRightMenu) {\n VolantisApp.message('系统提示', e, {\n icon: rightMenuConfig.options.iconPrefix + ' fa-exclamation-square red',\n displayMode: 1,\n time: 9000\n });\n }\n })\n }\n\n fn.copyAll = () => {\n globalData.mouseEvent.target.select();\n }\n\n fn.copyPaste = async () => {\n const result = await RightMenus.readClipboard() || '';\n if (RightMenus.messageRightMenu && window.clipboardRead === false) {\n VolantisApp.message('系统提示', '未授予剪切板读取权限!');\n } else if (RightMenus.messageRightMenu && result === '') {\n VolantisApp.message('系统提示', '仅支持复制文本内容!');\n } else {\n RightMenus.insertAtCaret(globalData.mouseEvent.target, result);\n }\n }\n\n fn.copyCut = () => {\n const statrPos = globalData.mouseEvent.target.selectionStart;\n const endPos = globalData.mouseEvent.target.selectionEnd;\n const inputStr = globalData.inputValue;\n fn.copyText(globalData.selectText);\n globalData.mouseEvent.target.value = inputStr.substring(0, statrPos) + inputStr.substring(endPos, inputStr.length);\n globalData.mouseEvent.target.selectionStart = statrPos;\n globalData.mouseEvent.target.selectionEnd = statrPos;\n globalData.mouseEvent.target.focus();\n }\n\n fn.copyImg = () => {\n if (volantis.GLOBAL_CONFIG.plugins.message.rightmenu.notice) {\n VolantisApp.message('系统提示', '复制中,请等待。', {\n icon: rightMenuConfig.options.iconPrefix + ' fa-images'\n })\n }\n RightMenus.writeClipImg(globalData.mediaLinkUrl, e => {\n if (RightMenus.messageRightMenu) {\n VolantisApp.hideMessage();\n VolantisApp.message('系统提示', '图片复制成功!', {\n icon: rightMenuConfig.options.iconPrefix + ' fa-images'\n });\n }\n }, (e) => {\n console.error(e);\n if (RightMenus.messageRightMenu) {\n VolantisApp.hideMessage();\n VolantisApp.message('系统提示', '复制失败:' + e, {\n icon: rightMenuConfig.options.iconPrefix + ' fa-exclamation-square red',\n time: 9000\n });\n }\n })\n }\n\n fn.printMode = () => {\n if (window.location.pathname === globalData.pathName) {\n if (RightMenus.messageRightMenu) {\n const message = '是否打印当前页面?<br><em style=\"font-size: 80%\">建议打印时勾选背景图形</em><br>'\n VolantisApp.question('', message, { time: 9000 }, () => { fn.printHtml() })\n } else {\n fn.printHtml()\n }\n }\n }\n\n fn.printHtml = () => {\n if (volantis.isReadModel) fn.readMode();\n DOMController.setAttribute('details', 'open', 'true');\n DOMController.removeList([\n '.cus-article-bkg', '.iziToast-overlay', '.iziToast-wrapper', '.prev-next',\n 'footer', '#l_header', '#l_cover', '#l_side', '#comments', '#s-top', '#BKG',\n '#rightmenu-wrapper', '.nav-tabs', '.parallax-mirror', '.new-meta-item.share', \n '.new-meta-box', 'button.btn-copy', 'iframe'\n ]);\n DOMController.setStyleList([\n ['body', 'backgroundColor', 'unset'], ['#l_main, .copyright.license', 'width', '100%'], \n ['#post', 'boxShadow', 'none'], ['#post', 'background', 'none'], ['#post', 'padding', '0'], \n ['h1', 'textAlign', 'center'], ['h1', 'fontWeight', '600'], ['h1', 'fontSize', '2rem'], ['h1', 'marginBottom', '20px'], \n ['.tab-pane', 'display', 'block'], ['.tab-content', 'borderTop', 'none'], ['.highlight>table pre', 'whiteSpace', 'pre-wrap'], \n ['.highlight>table pre', 'wordBreak', 'break-all'], ['.fancybox img', 'height', 'auto'], ['.fancybox img', 'weight', 'auto'], \n ['.copyright.license', 'margin', '0'], ['.copyright.license', 'padding', '1.25em 20px'], \n ['figure.highlight, .copyright.license', 'display', 'inline-block'], \n ]);\n setTimeout(() => {\n window.print();\n document.body.innerHTML = '';\n window.location.reload();\n }, 50);\n }\n\n fn.readMode = () => {\n if (typeof ScrollReveal === 'function') ScrollReveal().clean('#comments');\n DOMController.setStyle('#l_header', 'opacity', 0);\n DOMController.fadeToggleList([\n document.querySelector('#l_cover'), document.querySelector('footer'),\n document.querySelector('#s-top'), document.querySelector('.article-meta#bottom'),\n document.querySelector('.prev-next'), document.querySelector('#l_side'),\n document.querySelector('#comments'), \n ]);\n DOMController.toggleClassList([\n [document.querySelector('#l_main'), 'common_read'], [document.querySelector('#l_main'), 'common_read_main'],\n [document.querySelector('#l_body'), 'common_read'], [document.querySelector('#safearea'), 'common_read'],\n [document.querySelector('#pjax-container'), 'common_read'], [document.querySelector('#read_bkg'), 'common_read_hide'],\n [document.querySelector('h1'), 'common_read_h1'], [document.querySelector('#post'), 'post_read'],\n [document.querySelector('#l_cover'), 'read_cover'], [document.querySelector('.widget.toc-wrapper'), 'post_read']\n ]);\n DOMController.setStyle('.copyright.license', 'margin', '15px 0');\n volantis.isReadModel = volantis.isReadModel === undefined ? true : !volantis.isReadModel;\n if (volantis.isReadModel) {\n if (RightMenus.messageRightMenu) VolantisApp.message('系统提示', '阅读模式已开启,您可以点击屏幕空白处退出。', {\n backgroundColor: 'var(--color-read-post)',\n icon: rightMenuConfig.options.iconPrefix + ' fa-book-reader',\n displayMode: 1,\n time: 5000\n });\n document.querySelector('#l_body').removeEventListener('click', fn.readMode);\n document.querySelector('#l_body').addEventListener('click', (event) => {\n if (DOMController.hasClass(event.target, 'common_read')) {\n fn.readMode();\n }\n });\n } else {\n document.querySelector('#l_body').removeEventListener('click', fn.readMode);\n document.querySelector('#post').removeEventListener('click', fn.readMode);\n DOMController.setStyle('.prev-next', 'display', 'flex');\n DOMController.setStyle('.copyright.license', 'margin', '15px -40px');\n DOMController.setStyle('#l_header', 'opacity', 'unset');\n }\n }\n\n return {\n init: fn.initEvent,\n hideMenu: fn.hideMenu,\n readMode: fn.readMode\n }\n})()\n\nObject.freeze(RightMenus);\nvolantis.requestAnimationFrame(() => {\n if (document.readyState !== 'loading') {\n RightMenus.initialMenu();\n } else {\n document.addEventListener(\"DOMContentLoaded\", function () {\n RightMenus.initialMenu();\n })\n }\n});\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"../../../../js/plugins/tags/contributors.js","names":["ContributorsJS","requestAPI","url","callback","timeout","retryTimes","request","Promise","resolve","reject","status","timer","setTimeout","fetch","then","response","clearTimeout","ok","json","Error","data","catch","error","layout","cfg","el","api","querySelector","remove","cellALL","forEach","item","i","user","html_url","login","avatar_url","avatar","innerHTML","innerText","e","start","els","document","getElementsByClassName","length","getAttribute","Object","class","volantis","GLOBAL_CONFIG","default","addEventListener"],"sources":["js/plugins/tags/contributors.js"],"mappings":"AAAA,MAAMA,eAAiB,CACrBC,WAAY,CAACC,EAAKC,EAAUC,KAC1B,IAAIC,EAAa,GAEjB,SAASC,IACP,OAAO,IAAIC,SAAQ,CAACC,EAASC,KAC3B,IAAIC,EAAS,EACTC,EAAQC,YAAW,KACN,IAAXF,IACFA,EAAS,EACTC,EAAQ,KACRF,EAAO,QACW,GAAdJ,GACFD,IAEJ,GACC,KACHS,MAAMX,GAAKY,MAAK,SAAUC,GAOxB,GANe,IAAXL,IACFM,aAAaL,GACbH,EAAQO,GACRJ,EAAQ,KACRD,EAAS,GAEPK,EAASE,GACX,OAAOF,EAASG,OAElB,MAAM,IAAIC,MAAM,+BAClB,IAAGL,MAAK,SAAUM,GAChBf,EAAa,EACbF,EAASiB,EACX,IAAGC,OAAM,SAAUC,GACbjB,EAAa,GACfA,GAAc,EACdO,YAAW,KACTN,GAAS,GACR,MAEHF,GAEJ,GAAE,GAEN,CACAE,EAAS,EAEXiB,OAASC,IACP,MAAMC,EAAKD,EAAIC,GACfzB,eAAeC,WAAWuB,EAAIE,KAAK,SAAUN,GAC3CK,EAAGE,cAAc,iBAAiBC,SAClC,IAAIC,EAAU,IACbT,GAAQ,IAAIU,SAAQ,CAACC,EAAMC,KAC1B,IAAIC,EAAO,0BACXA,GAAQ,0EACRA,GAAQ,UAAYF,EAAKG,SAAW,KACpCD,GAAQ,aAAeF,EAAKI,MAAQ,WAAaJ,EAAKK,YAAcZ,EAAIa,QAAU,oCAClFJ,GAAQ,2BAA6BF,EAAKI,MAAQ,gBAClDF,GAAQ,OAERJ,GADAI,GAAQ,QACO,IAEjBR,EAAGE,cAAc,eAAeW,UAAYT,CAC9C,IAAG,WACD,IACEJ,EAAGE,cAAc,qBAAqBC,SACtCH,EAAGE,cAAc,mBAAmBY,UAAU,cAChD,CAAE,MAAOC,GAAK,CAChB,GAAE,EAEJC,MAAO,KACL,MAAMC,EAAMC,SAASC,uBAAuB,uBAC5C,IAAK,IAAIZ,EAAI,EAAGA,EAAIU,EAAIG,OAAQb,IAAK,CACnC,MAAMP,EAAKiB,EAAIV,GACTN,EAAMD,EAAGqB,aAAa,OAC5B,GAAW,MAAPpB,EAAJ,CAGA,IAAIF,EAAM,IAAIuB,OACdvB,EAAIC,GAAKA,EACTD,EAAIE,IAAMA,EACVF,EAAIwB,MAAQvB,EAAGqB,aAAa,SAC5BtB,EAAIa,OAASY,SAASC,cAAcC,QAAQd,OAC5CrC,eAAeuB,OAAOC,EANtB,CAOF,IAMJxB,eAAeyC,QACfE,SAASS,iBAAiB,iBAAiB,WACzCpD,eAAeyC,OACjB","ignoreList":[],"sourcesContent":["const ContributorsJS = {\n requestAPI: (url, callback, timeout) => {\n let retryTimes = 5;\n\n function request() {\n return new Promise((resolve, reject) => {\n let status = 0; // 0 等待 1 完成 2 超时\n let timer = setTimeout(() => {\n if (status === 0) {\n status = 2;\n timer = null;\n reject('请求超时');\n if (retryTimes == 0) {\n timeout();\n }\n }\n }, 5000);\n fetch(url).then(function (response) {\n if (status !== 2) {\n clearTimeout(timer);\n resolve(response);\n timer = null;\n status = 1;\n }\n if (response.ok) {\n return response.json();\n }\n throw new Error('Network response was not ok.');\n }).then(function (data) {\n retryTimes = 0;\n callback(data);\n }).catch(function (error) {\n if (retryTimes > 0) {\n retryTimes -= 1;\n setTimeout(() => {\n request();\n }, 5000);\n } else {\n timeout();\n }\n });\n });\n }\n request();\n },\n layout: (cfg) => {\n const el = cfg.el;\n ContributorsJS.requestAPI(cfg.api, function (data) {\n el.querySelector('.loading-wrap').remove();\n var cellALL = \"\";\n (data || []).forEach((item, i) => {\n var user = '<div class=\"user-card\">';\n user += '<a class=\"card-link\" target=\"_blank\" rel=\"external noopener noreferrer\"';\n user += ' href=\"' + item.html_url + '\">';\n user += '<img alt=\"' + item.login + '\" src=\"' + (item.avatar_url || cfg.avatar) + '\" onerror=\"errorImgAvatar(this)\">';\n user += '<div class=\"name\"><span>' + item.login + '</span></div>';\n user += '</a>';\n user += '</div>';\n cellALL += user;\n });\n el.querySelector('.group-body').innerHTML = cellALL;\n }, function () {\n try {\n el.querySelector('.loading-wrap svg').remove();\n el.querySelector('.loading-wrap p').innerText('加载失败,请稍后重试。');\n } catch (e) { }\n });\n },\n start: () => {\n const els = document.getElementsByClassName('contributorsjs-wrap');\n for (var i = 0; i < els.length; i++) {\n const el = els[i];\n const api = el.getAttribute('api');\n if (api == null) {\n continue;\n }\n var cfg = new Object();\n cfg.el = el;\n cfg.api = api;\n cfg.class = el.getAttribute('class');\n cfg.avatar = volantis.GLOBAL_CONFIG.default.avatar;\n ContributorsJS.layout(cfg);\n }\n }\n}\n\n\n\nContributorsJS.start();\ndocument.addEventListener('pjax:complete', function () {\n ContributorsJS.start();\n});"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"../../../../js/plugins/tags/friends.js","names":["FriendsJS","requestAPI","url","callback","timeout","retryTimes","request","Promise","resolve","reject","status","timer","setTimeout","fetch","then","response","clearTimeout","ok","json","Error","data","catch","error","layout","cfg","el","api","querySelector","remove","arr","content","cellALL","forEach","item","i","user","title","avatar","innerHTML","innerText","e","start","els","document","getElementsByClassName","length","getAttribute","Object","class","volantis","GLOBAL_CONFIG","default","addEventListener"],"sources":["js/plugins/tags/friends.js"],"mappings":"AAAA,MAAMA,UAAY,CAChBC,WAAY,CAACC,EAAKC,EAAUC,KAC1B,IAAIC,EAAa,GAEjB,SAASC,IACP,OAAO,IAAIC,SAAQ,CAACC,EAASC,KAC3B,IAAIC,EAAS,EACTC,EAAQC,YAAW,KACN,IAAXF,IAC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IE,IAAMA,EACVF,EAAIwB,MAAQvB,EAAGqB,aAAa,SAC5BtB,EAAIa,OAASY,SAASC,cAAcC,QAAQd,OAC5CrC,UAAUuB,OAAOC,EANjB,CAOF,IAMJxB,UAAUyC,QACVE,SAASS,iBAAiB,iBAAiB,WACzCpD,UAAUyC,OACZ","ignoreList":[],"sourcesContent":["const FriendsJS = {\n requestAPI: (url, callback, timeout) => {\n let retryTimes = 5;\n\n function request() {\n return new Promise((resolve, reject) => {\n let status = 0; // 0 等待 1 完成 2 超时\n let timer = setTimeout(() => {\n if (status === 0) {\n status = 2;\n timer = null;\n reject('请求超时');\n if (retryTimes == 0) {\n timeout();\n }\n }\n }, 5000);\n fetch(url).then(function (response) {\n if (status !== 2) {\n clearTimeout(timer);\n resolve(response);\n timer = null;\n status = 1;\n }\n if (response.ok) {\n return response.json();\n }\n throw new Error('Network response was not ok.');\n }).then(function (data) {\n retryTimes = 0;\n callback(data);\n }).catch(function (error) {\n if (retryTimes > 0) {\n retryTimes -= 1;\n setTimeout(() => {\n request();\n }, 5000);\n } else {\n timeout();\n }\n });\n });\n }\n request();\n },\n layout: (cfg) => {\n const el = cfg.el;\n FriendsJS.requestAPI(cfg.api, function (data) {\n el.querySelector('.loading-wrap').remove();\n const arr = data.content;\n var cellALL = \"\";\n arr.forEach((item, i) => {\n var user = '<div class=\"user-card\">';\n user += '<a class=\"card-link\" target=\"_blank\" rel=\"external noopener noreferrer\"';\n user += ' href=\"' + item.url + '\">';\n user += '<img alt=\"' + item.title + '\" src=\"' + (item.avatar || cfg.avatar) + '\" onerror=\"errorImgAvatar(this)\">';\n user += '<div class=\"name\"><span>' + item.title + '</span></div>';\n user += '</a>';\n user += '</div>';\n cellALL += user;\n });\n el.querySelector('.group-body').innerHTML = cellALL;\n }, function () {\n try {\n el.querySelector('.loading-wrap svg').remove();\n el.querySelector('.loading-wrap p').innerText('加载失败,请稍后重试。');\n } catch (e) { }\n });\n },\n start: () => {\n const els = document.getElementsByClassName('friendsjs-wrap');\n for (var i = 0; i < els.length; i++) {\n const el = els[i];\n const api = el.getAttribute('api');\n if (api == null) {\n continue;\n }\n var cfg = new Object();\n cfg.el = el;\n cfg.api = api;\n cfg.class = el.getAttribute('class');\n cfg.avatar = volantis.GLOBAL_CONFIG.default.avatar;\n FriendsJS.layout(cfg);\n }\n }\n}\n\n\n\nFriendsJS.start();\ndocument.addEventListener('pjax:complete', function () {\n FriendsJS.start();\n});"]}
|