forked from Squatconf/Website
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
3.1 KiB
JavaScript
113 lines
3.1 KiB
JavaScript
10 years ago
|
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||
|
// shim for using process in browser
|
||
|
|
||
|
var process = module.exports = {};
|
||
|
|
||
|
process.nextTick = (function () {
|
||
|
var canSetImmediate = typeof window !== 'undefined'
|
||
|
&& window.setImmediate;
|
||
|
var canPost = typeof window !== 'undefined'
|
||
|
&& window.postMessage && window.addEventListener
|
||
|
;
|
||
|
|
||
|
if (canSetImmediate) {
|
||
|
return function (f) { return window.setImmediate(f) };
|
||
|
}
|
||
|
|
||
|
if (canPost) {
|
||
|
var queue = [];
|
||
|
window.addEventListener('message', function (ev) {
|
||
|
var source = ev.source;
|
||
|
if ((source === window || source === null) && ev.data === 'process-tick') {
|
||
|
ev.stopPropagation();
|
||
|
if (queue.length > 0) {
|
||
|
var fn = queue.shift();
|
||
|
fn();
|
||
|
}
|
||
|
}
|
||
|
}, true);
|
||
|
|
||
|
return function nextTick(fn) {
|
||
|
queue.push(fn);
|
||
|
window.postMessage('process-tick', '*');
|
||
|
};
|
||
|
}
|
||
|
|
||
|
return function nextTick(fn) {
|
||
|
setTimeout(fn, 0);
|
||
|
};
|
||
|
})();
|
||
|
|
||
|
process.title = 'browser';
|
||
|
process.browser = true;
|
||
|
process.env = {};
|
||
|
process.argv = [];
|
||
|
|
||
|
function noop() {}
|
||
|
|
||
|
process.on = noop;
|
||
|
process.addListener = noop;
|
||
|
process.once = noop;
|
||
|
process.off = noop;
|
||
|
process.removeListener = noop;
|
||
|
process.removeAllListeners = noop;
|
||
|
process.emit = noop;
|
||
|
|
||
|
process.binding = function (name) {
|
||
|
throw new Error('process.binding is not supported');
|
||
|
}
|
||
|
|
||
|
// TODO(shtylman)
|
||
|
process.cwd = function () { return '/' };
|
||
|
process.chdir = function (dir) {
|
||
|
throw new Error('process.chdir is not supported');
|
||
|
};
|
||
|
|
||
|
},{}],2:[function(require,module,exports){
|
||
|
/*!
|
||
|
* domready (c) Dustin Diaz 2014 - License MIT
|
||
|
*/
|
||
|
!function (name, definition) {
|
||
|
|
||
|
if (typeof module != 'undefined') module.exports = definition()
|
||
|
else if (typeof define == 'function' && typeof define.amd == 'object') define(definition)
|
||
|
else this[name] = definition()
|
||
|
|
||
|
}('domready', function () {
|
||
|
|
||
|
var fns = [], listener
|
||
|
, doc = document
|
||
|
, hack = doc.documentElement.doScroll
|
||
|
, domContentLoaded = 'DOMContentLoaded'
|
||
|
, loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState)
|
||
|
|
||
|
|
||
|
if (!loaded)
|
||
|
doc.addEventListener(domContentLoaded, listener = function () {
|
||
|
doc.removeEventListener(domContentLoaded, listener)
|
||
|
loaded = 1
|
||
|
while (listener = fns.shift()) listener()
|
||
|
})
|
||
|
|
||
|
return function (fn) {
|
||
|
loaded ? fn() : fns.push(fn)
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
},{}],3:[function(require,module,exports){
|
||
|
(function (process){
|
||
|
var ready = require('domready')
|
||
|
|
||
|
process.nextTick(function() {
|
||
|
ready(function() {
|
||
|
|
||
|
console.log('ready')
|
||
|
|
||
|
})
|
||
|
})
|
||
|
|
||
|
|
||
|
}).call(this,require('_process'))
|
||
|
},{"_process":1,"domready":2}]},{},[3]);
|