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
/* | |
SexyDollar Extended library by Witiko | |
Function $() | |
1st argument: "tagName", "#id", ".className", "tagName.className", "@name", "tagName@name" | |
2nd argument: Array / NodeList / Element parentElement (optional) | |
*/ |
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
/* | |
SexyDollar library by Witiko | |
Function $() | |
1st argument: "tagName", "#id", ".className", "tagName.className", "@name", "tagName@name" | |
2nd argument: parentElement (optional) | |
*/ |
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
/* | |
Compatible Now! ~ Vít Novotný 2009 - 2011 | |
Requires: | |
* Ecma5.js | |
*/ | |
(function(Array, String, 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
/* | |
Screen library | |
Copyright (C) 2010 Vít Novotný | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
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 DayTime; (function() { | |
var DAWN = 0, // Function flags | |
DUSK = 1, | |
DAY = 0, // Status flags | |
NIGHT = 1; | |
DayTime = function(latitude, longitude) { | |
if(latitude === undefined || | |
longitude === undefined) | |
throw new Error("Define both the latitude and longitude!"); |
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 Object2() { | |
this.prototypes = arguments; | |
this.attributes = {}; | |
}; Object2.prototype.get = function(key) { | |
return this.attributes[key] || (function(array) { | |
for(var i = 0, l = array.length, result; !result && i < l; i++) | |
result = array[i].get(key); return result; | |
})(this.prototypes); | |
}; Object2.prototype.set = function(key, value) { | |
this.attributes[key] = value; |
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 Points(lat1, lon1, alt1, | |
lat2, lon2, alt2) { | |
alt1 = alt1 / 1000 || 0; | |
alt2 = alt2 / 1000 || 0; | |
var dLat = (lat2 - lat1).degToRad(), | |
dLon = (lon2 - lon1).degToRad(), | |
dAlt = alt2 - alt1; | |
lat1 = lat1.degToRad(); | |
lat2 = lat2.degToRad(); | |
lon1 = lon1.degToRad(); |
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 Accessors = (function($, undefined) { | |
var ECMA5Support = | |
Object.getOwnPropertyDescriptor instanceof Function && | |
Object.defineProperty instanceof Function && (function() { | |
var o = {}, f = function() {return true}; | |
try { | |
Object.defineProperty(o, "o", {get: f}); | |
return o.o && Object.getOwnPropertyDescriptor(o, "o").get === f; | |
} catch(e) { | |
return false; |
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(global, isNaN, undefined) { | |
var arrLikeString = !!"1"[0], has, get; | |
if(!arrLikeString) { | |
has = function(arr, item, isStr) { | |
return isStr?item < arr.length: | |
item in arr; | |
}; | |
get = function(arr, item, isStr) { | |
return isStr?arr.charAt(item):arr[item]; |
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.overload = function(f) { | |
if(!(f instanceof Function)) return; | |
var _$ = function() { | |
var $ = [arguments, , this, _$._overloads], | |
_ = function(type, index) { | |
if(type instanceof Array) return type.some(function(type) { | |
return _(type, index); | |
}); | |
if(!($[0][index] instanceof Object)) | |
$[0][index] = Object($[0][index]); |