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
| function curry(func) { | |
| var paramLength = func.length, | |
| args = []; | |
| return function collectParams () { | |
| args = args.concat([].slice.call(arguments)); | |
| if (args.length >= paramLength) { | |
| return func.apply(null, args); | |
| } else { |
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
| <div class="svg-container"> | |
| <svg width="100%" height="100%"> | |
| <path class="spline" d="" style="fill: none; stroke: red; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1px;"></path> | |
| <g class="dots"></g> | |
| </svg> | |
| </div> |
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
| var arr = [1, 2, 3, 4, 5, 6], | |
| len = arr.length; | |
| var stack = function() { | |
| console.log('all done'); | |
| }; | |
| while(len--) { | |
| var elem = arr[len]; | |
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
| function EventTarget() { | |
| this._listeners = {}; | |
| } | |
| EventTarget.prototype = { | |
| constructor: EventTarget, | |
| on: function (type, listener) { | |
| if (typeof this._listeners[type] == "undefined") { |
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
| window.GetQueryString = function(q) { | |
| return (function(a) { | |
| if (a == "") return {}; | |
| var b = {}; | |
| for (var i = 0; i < a.length; ++i) { | |
| var p = a[i].split('='); | |
| if (p.length != 2) continue; | |
| b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " ")); | |
| } | |
| return b; |
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
| //Copyright (c) 2010 Nicholas C. Zakas. All rights reserved. | |
| //MIT License | |
| function EventTarget(){ | |
| this._listeners = {}; | |
| } | |
| EventTarget.prototype = { | |
| constructor: EventTarget, |
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
| var localStorageAdapter = { | |
| storeName: 'NTESBBS', | |
| isLocalStorage: window.localStorage ? true : false, | |
| dataDOM: this.isLocalStorage ? null : (function () { | |
| try { | |
| var dataDOM = document.createElement('input'), | |
| expires = new Date(); |