Skip to content

Instantly share code, notes, and snippets.

@sivagao
Created April 14, 2013 07:55
Show Gist options
  • Select an option

  • Save sivagao/5381838 to your computer and use it in GitHub Desktop.

Select an option

Save sivagao/5381838 to your computer and use it in GitHub Desktop.
JS:Utility-140Byte.js
// 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