Created
April 14, 2013 07:55
-
-
Save sivagao/5381838 to your computer and use it in GitHub Desktop.
JS:Utility-140Byte.js
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
| // The most basic JavaScript loader for any web page | |
| var | |
| // list of files to load | |
| list = [ | |
| 'file1.js', | |
| 'file2.js' | |
| ], | |
| // script dom node | |
| script, | |
| // script source string | |
| src; | |
| onload(); | |
| function onload(){ | |
| if(src = list.shift()){ | |
| script = document.body.appendChild( | |
| document.createElement('script'); | |
| ); | |
| script.onload = onload; | |
| script.src = src; | |
| } | |
| } | |
| (function(AP){ | |
| if ('find' in AP) return; | |
| function find(value){ | |
| } | |
| AP.find = find(!0); | |
| AP.findIndex = find(!1); | |
| })(Array.prototype); | |
| function d( | |
| a, // construcor function | |
| b, // arguments | |
| c // placeholder for length | |
| ){ | |
| } | |
| // UUID | |
| // abbr. 通用唯一标识符(Universally Unique Identifier) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment