275 lines
3.8 KiB
JavaScript
275 lines
3.8 KiB
JavaScript
|
document = {};
|
||
|
var navigator = function() {
|
||
|
this.geolocation = function() {
|
||
|
this.getCurrentPosition = function() {
|
||
|
this.coords = {latitude: "", longitude: ""};
|
||
|
return this;
|
||
|
};
|
||
|
return this;
|
||
|
};
|
||
|
return this;
|
||
|
};
|
||
|
function $() {
|
||
|
if (!(this instanceof $)) {
|
||
|
return new $();
|
||
|
}
|
||
|
}
|
||
|
function returnThis() { return this; }
|
||
|
function return$() { return $; }
|
||
|
var methods = [
|
||
|
'add',
|
||
|
'addBack',
|
||
|
'addClass',
|
||
|
'after',
|
||
|
'ajaxComplete',
|
||
|
'ajaxError',
|
||
|
'ajaxSend',
|
||
|
'ajaxStart',
|
||
|
'ajaxStop',
|
||
|
'ajaxSuccess',
|
||
|
'andSelf',
|
||
|
'animate',
|
||
|
'append',
|
||
|
'appendTo',
|
||
|
'attr',
|
||
|
'before',
|
||
|
'bind',
|
||
|
'blur',
|
||
|
'callbacksadd',
|
||
|
'callbacksdisable',
|
||
|
'callbacksdisabled',
|
||
|
'callbacksempty',
|
||
|
'callbacksfire',
|
||
|
'callbacksfired',
|
||
|
'callbacksfireWith',
|
||
|
'callbackshas',
|
||
|
'callbackslock',
|
||
|
'callbackslocked',
|
||
|
'callbacksremove',
|
||
|
'change',
|
||
|
'children',
|
||
|
'clearQueue',
|
||
|
'click',
|
||
|
'clone',
|
||
|
'closest',
|
||
|
'contents',
|
||
|
'context',
|
||
|
'css',
|
||
|
'data',
|
||
|
'dblclick',
|
||
|
'delay',
|
||
|
'delegate',
|
||
|
'dequeue',
|
||
|
'detach',
|
||
|
'die',
|
||
|
'each',
|
||
|
'empty',
|
||
|
'end',
|
||
|
'eq',
|
||
|
'error',
|
||
|
'fadeIn',
|
||
|
'fadeOut',
|
||
|
'fadeTo',
|
||
|
'fadeToggle',
|
||
|
'filter',
|
||
|
'find',
|
||
|
'finish',
|
||
|
'first',
|
||
|
'focus',
|
||
|
'focusin',
|
||
|
'focusout',
|
||
|
'get',
|
||
|
'has',
|
||
|
'hasClass',
|
||
|
'height',
|
||
|
'hide',
|
||
|
'hover',
|
||
|
'html',
|
||
|
'index',
|
||
|
'innerHeight',
|
||
|
'innerWidth',
|
||
|
'insertAfter',
|
||
|
'insertBefore',
|
||
|
'is',
|
||
|
'jQuery',
|
||
|
'jquery',
|
||
|
'keydown',
|
||
|
'keypress',
|
||
|
'keyup',
|
||
|
'last',
|
||
|
'length',
|
||
|
'live',
|
||
|
'load',
|
||
|
'load',
|
||
|
'map',
|
||
|
'mousedown',
|
||
|
'mouseenter',
|
||
|
'mouseleave',
|
||
|
'mousemove',
|
||
|
'mouseout',
|
||
|
'mouseover',
|
||
|
'mouseup',
|
||
|
'next',
|
||
|
'nextAll',
|
||
|
'nextUntil',
|
||
|
'not',
|
||
|
'off',
|
||
|
'offset',
|
||
|
'offsetParent',
|
||
|
'on',
|
||
|
'one',
|
||
|
'outerHeight',
|
||
|
'outerWidth',
|
||
|
'parent',
|
||
|
'parents',
|
||
|
'parentsUntil',
|
||
|
'position',
|
||
|
'prepend',
|
||
|
'prependTo',
|
||
|
'prev',
|
||
|
'prevAll',
|
||
|
'prevUntil',
|
||
|
'promise',
|
||
|
'prop',
|
||
|
'pushStack',
|
||
|
'queue',
|
||
|
'ready',
|
||
|
'remove',
|
||
|
'removeAttr',
|
||
|
'removeClass',
|
||
|
'removeData',
|
||
|
'removeProp',
|
||
|
'replaceAll',
|
||
|
'replaceWith',
|
||
|
'resize',
|
||
|
'scroll',
|
||
|
'scrollLeft',
|
||
|
'scrollTop',
|
||
|
'select',
|
||
|
'selector',
|
||
|
'serialize',
|
||
|
'serializeArray',
|
||
|
'show',
|
||
|
'siblings',
|
||
|
'size',
|
||
|
'slice',
|
||
|
'slideDown',
|
||
|
'slideToggle',
|
||
|
'slideUp',
|
||
|
'stop',
|
||
|
'submit',
|
||
|
'text',
|
||
|
'toArray',
|
||
|
'toggle',
|
||
|
'toggle',
|
||
|
'toggleClass',
|
||
|
'trigger',
|
||
|
'triggerHandler',
|
||
|
'unbind',
|
||
|
'undelegate',
|
||
|
'unload',
|
||
|
'unwrap',
|
||
|
'val',
|
||
|
'width',
|
||
|
'wrap',
|
||
|
'wrapAll',
|
||
|
'wrapInner'
|
||
|
];
|
||
|
|
||
|
var statics = [
|
||
|
'ajax',
|
||
|
'ajaxPrefilter',
|
||
|
'ajaxSetup',
|
||
|
'ajaxTransport',
|
||
|
'boxModel',
|
||
|
'browser',
|
||
|
'Callbacks',
|
||
|
'contains',
|
||
|
'cssHooks',
|
||
|
'cssNumber',
|
||
|
'data',
|
||
|
'Deferred',
|
||
|
'dequeue',
|
||
|
'each',
|
||
|
'error',
|
||
|
'extend',
|
||
|
'fnextend',
|
||
|
'fxinterval',
|
||
|
'fxoff',
|
||
|
'get',
|
||
|
'getJSON',
|
||
|
'getScript',
|
||
|
'globalEval',
|
||
|
'grep',
|
||
|
'hasData',
|
||
|
'holdReady',
|
||
|
'inArray',
|
||
|
'isArray',
|
||
|
'isEmptyObject',
|
||
|
'isFunction',
|
||
|
'isNumeric',
|
||
|
'isPlainObject',
|
||
|
'isWindow',
|
||
|
'isXMLDoc',
|
||
|
'makeArray',
|
||
|
'map',
|
||
|
'merge',
|
||
|
'noConflict',
|
||
|
'noop',
|
||
|
'now',
|
||
|
'param',
|
||
|
'parseHTML',
|
||
|
'parseJSON',
|
||
|
'parseXML',
|
||
|
'post',
|
||
|
'proxy',
|
||
|
'queue',
|
||
|
'removeData',
|
||
|
'sub',
|
||
|
'support',
|
||
|
'trim',
|
||
|
'type',
|
||
|
'unique',
|
||
|
'when',
|
||
|
'always',
|
||
|
'done',
|
||
|
'fail',
|
||
|
'isRejected',
|
||
|
'isResolved',
|
||
|
'notify',
|
||
|
'notifyWith',
|
||
|
'pipe',
|
||
|
'progress',
|
||
|
'promise',
|
||
|
'reject',
|
||
|
'rejectWith',
|
||
|
'resolve',
|
||
|
'resolveWith',
|
||
|
'state',
|
||
|
'then',
|
||
|
'currentTarget',
|
||
|
'data',
|
||
|
'delegateTarget',
|
||
|
'isDefaultPrevented',
|
||
|
'isImmediatePropagationStopped',
|
||
|
'isPropagationStopped',
|
||
|
'metaKey',
|
||
|
'namespace',
|
||
|
'pageX',
|
||
|
'pageY',
|
||
|
'preventDefault',
|
||
|
'relatedTarget',
|
||
|
'result',
|
||
|
'stopImmediatePropagation',
|
||
|
'stopPropagation',
|
||
|
'target',
|
||
|
'timeStamp',
|
||
|
'type',
|
||
|
'which'
|
||
|
];
|
||
|
|
||
|
var $Proto = {};
|
||
|
methods.forEach(method => $Proto[method] = returnThis);
|
||
|
statics.forEach(staticMeth => $[staticMeth] = return$);
|
||
|
$.prototype = Object.create($);
|