This file contains 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
/* | |
Script: Date.Portuguese.BR.js | |
Date messages in Portuguese-BR. Thanks Fábio Miranda Costa. | |
License: | |
MIT-style license. | |
*/ | |
MooTools.lang.set('pt-BR', 'Date', { |
This file contains 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
Array.from = function(item, slice){ | |
if(!item) return []; | |
if(!Type.isEnumerable(item)) return [item]; | |
slice = slice || 0; | |
try{ | |
return Array.prototype.slice.call(item, slice); | |
} | |
catch(e){ | |
var l = item.length, array = new Array(l), i = slice; | |
for(; i < l; i++) array[i] = item[i]; |
This file contains 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 old = Array.from; | |
try { | |
old(document.html.childNodes); | |
} catch(e){ | |
Array.from = function(item, slice){ | |
if (typeOf(item) == 'collection'){ | |
var l = item.length, array = new Array(l - slice), i = slice - 1; | |
while (++i < l) array[i] = item[i]; | |
return array; | |
} |
This file contains 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(){ | |
var styleString = Element.getComputedStyle; | |
function styleNumber(element, style){ | |
return styleString(element, style).toInt() || 0; | |
}; | |
function isBody(element){ | |
return (/^(?:body|html)$/i).test(element.tagName); | |
}; | |
Element.implement({ | |
getPosition: function(relative){ |
This file contains 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
/* | |
Copyright (c) 2009 Rob Bast | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software |
This file contains 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
// a console object that outputs at the terminal | |
load('shell_console.js'); | |
// makes jasmine-0.10.0 stop breaking | |
var window = this; | |
window.setTimeout = function(){}; | |
window.setInterval = function(){}; | |
window.clearTimeout = function(){}; | |
window.clearInterval = function(){}; | |
XMLHttpRequest = function(){}; |
This file contains 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
// IE | |
var arrayFrom = Array.from; | |
try { | |
arrayFrom(document.html.childNodes); | |
} catch(e){ | |
Array.from = function(item){ | |
if (Type.isEnumerable(item)){ | |
var i = item.length, array = new Array(i); | |
while (i--) array[i] = item[i]; | |
return array; |
This file contains 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
/* | |
old delay function | |
delay: function(delay, bind, args){ | |
return this.create({bind: bind, arguments: args, delay: delay})(); | |
} | |
*/ |
This file contains 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
/* | |
old delay function | |
delay: function(delay, bind, args){ | |
return this.create({bind: bind, arguments: args, delay: delay})(); | |
} | |
*/ |
OlderNewer