1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | SnailBait = function () { ... this.TWEET_PREAMBLE = 'https://twitter.com/intent/tweet?text=I scored '; this.TWEET_PROLOGUE = ' playing this HTML5 Canvas platformer: ' + 'http://bit.ly/NDV761 &hashtags=html5'; ... }; SnailBait.prototype = { ... revealCredits: function () { this.creditsElement.style.display = 'block'; this.revealLivesIcons(); this.tweetElement.href = TWEET_PREAMBLE + this.score + TWEET_PROLOGUE; setTimeout( function () { snailBait.creditsElement.style.opacity = 1.0; }, snailBait.SHORT_DELAY); }, ... }; |
1 2 3 4 5 6 7 8 9 | #!/bin/bash mkdir tmp for f in `find . -name "*.js"` do echo 'Compressing ' $f java -jar ~/Utilities/yuicompressor-2.4.7.jar $f >> tmp/all.js done |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/bin/bash rm -rf tmp rm all.js rm *.gz echo 'Compressing...' echo ./compress.sh echo 'Deploying...' echo gzip < all.js > all.js.gz gzip < index.html > index.html.gz gzip < snailbait.css > snailbait.css.gz rm -rf tmp |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |