holyshared/Presentation — Issue #28: Deletion of browser distinction logic
Author: holyshared
Created: 2012-01-24 03:44:53+00:00
State: open

before

var decorater, transitionEnd;

if (Browser.chrome || Browser.safari) {
transitionEnd = 'webkitTransitionEnd';
} else if (Browser.firefox) {
transitionEnd = 'transitionend';
} else if (Browser.opera) {
transitionEnd = 'oTransitionEnd';
} else {
transitionEnd = 'msTransitionEnd';
}

if (Browser.ie && Browser.version <= 9) {
Object.merge(Content, {
initialize: function(element, options){
this.setOptions(options);
this._element = element;
}
});
decorater = Decorater.Legacy;
} else {
Object.merge(Content, {
initialize: function(element, options){
var content = this;
this.setOptions(options);
this._element = element;
this._element.addEventListener(transitionEnd, function(){
content.fireEvent('transitionEnd', [this]);
}, false);
}
});
decorater = Decorater.Modan;
}

after

var decorater, transitionEnd;

if (Browser.chrome || Browser.safari) {
transitionEnd = 'webkitTransitionEnd';
} else if (Browser.firefox) {
transitionEnd = 'transitionend';
} else if (Browser.opera) {
transitionEnd = 'oTransitionEnd';
} else {
transitionEnd = 'msTransitionEnd';
}

Object.merge(Content, {
initialize: function(element, options){
this.setOptions(options);
this._element = element;
}
});
decorater = Decorater.Legacy;