This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node_modules | |
| dist/ | |
| yarn.lock | |
| wwwroot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // execute callback only after a pause in user input; the function returned | |
| // can be used to handle an event type that tightly repeats (such as typing | |
| // or scrolling events); it will execute the callback only if the given timout | |
| // period has passed since the last time the same event fired | |
| function createOnPause(callback, timeout, _this) { | |
| return function(e) { | |
| var _that = this; | |
| if (arguments.callee.timer) | |
| clearTimeout(arguments.callee.timer); | |
| arguments.callee.timer = setTimeout(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Output Android Icons.jsx | |
| // 2012 Todd Linkner | |
| // License: none (public domain) | |
| // v1.0 | |
| // | |
| // This script is for Photoshop CS6. It outputs Android icons of the | |
| // following sizes from a source PSD at least 512px x 512px | |
| // | |
| // store: | |
| // Icon.png (512px x 512px) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * 频率控制 返回函数连续调用时,action 执行频率限定为 次 / delay | |
| * @param delay {number} 延迟时间,单位毫秒 | |
| * @param action {function} 请求关联函数,实际应用需要调用的函数 | |
| * @param tail? {bool} 是否在尾部用定时器补齐调用 | |
| * @return {function} 返回客户调用函数 | |
| */ | |
| var throttle = function(delay,action,tail,debounce) { | |
| var now = Date.now, last_call = 0, last_exec = 0, timer = null, curr, diff, | |
| ctx, args, exec = function() { |