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
// Element Listener Mixin | |
(function(){ | |
var property = '$listener'; | |
var setup = function(element){ | |
var listener = new Events, removeEvent = listener.removeEvent; | |
listener.removeEvent = function(key, value){ | |
removeEvent.call(this, key, value); | |
element.removeEvent(key, value); | |
}; |
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(){ | |
this.Queue = new Class({ | |
Extends: Chain, | |
Implements: Class.Binds, | |
call: function(){ | |
if (this.busy || !this.$chain.length) return this; |
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
[alias] | |
st = status | |
ci = commit | |
co = checkout | |
br = branch | |
cp = cherry-pick | |
sub = submodule update --init --recursive | |
rb = pull --rebase |
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(){ | |
// thanks @astolwijk | |
var key = (function(){ | |
var list = ['', 'webkit', 'Moz', 'O', 'ms'], | |
element = document.html; | |
for (var i = 0; i < list.length; i++){ | |
var prefix = list[i]; | |
if (element.style[prefix ? prefix + 'TransitionProperty' : 'transitionProperty'] != null) |
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 global = this, | |
list = ['', 'webkit', 'Moz', 'O', 'ms'], | |
prefixList = {}, | |
setStyle = Element.prototype.setStyle, | |
getStyle = Element.prototype.getStyle; | |
var getPrefix = function(property){ | |
property = property.camelCase(); |
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(){ | |
this.Accessor = function(singular, plural){ | |
singular = (singular || '').capitalize(); | |
if (!plural) plural = singular + 's'; | |
var accessor = {}, matchers = []; | |
this['define' + singular] = function(key, value){ |
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 hasTransitionSupport = (document.html.style[Element.getStyleProperty('transition')] != null), | |
prefix = Element.getVendorPrefix('transition'), | |
key = prefix.replace(/-/g, ''), | |
Key = key.capitalize(), | |
Transition = 'Transition', | |
durationProperty = Key + Transition + 'Duration', | |
transitionProperty = Key + Transition, | |
transition = key ? key + Transition : 'transition', |
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
if (!window.addEventListener) (function(){ | |
Element.Events.keychange = { | |
base: 'keyup', | |
condition: function(e){ | |
var type = this.get('type'), | |
key = e.key; | |
if (type == 'radio') | |
return (key == 'up' || key == 'down' || key == 'left' || key == 'right' ) && this.checked; |
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
/* | |
--- | |
name: Element.Event.Change | |
description: Normalizes the onchange-event in Internet Explorer for checkboxes and radio buttons. | |
license: MIT-style license. | |
requires: [Element.Event] |
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
/*<ltIE9>*/ | |
if (!window.addEventListener) (function(){ | |
var update = function(event){ | |
event.target.store('$change', event.target.checked); | |
}; | |
Element.Events.change = { | |
base: 'click', | |
condition: function(event){ |