diff options
author | Luc Didry <luc@didry.org> | 2013-12-05 08:41:29 +0100 |
---|---|---|
committer | Luc Didry <luc@didry.org> | 2013-12-05 08:41:29 +0100 |
commit | 3d8452b1439fd24473fb68653cb2f7e3e0bbdb4b (patch) | |
tree | 87b7ba7cd1a2ddc61924c479c1b5e42abf4db502 /src/static/js/html10n.js | |
parent | 03ff5563f4ed406b6afaacc575e06e86aa939947 (diff) | |
download | etherpad-lite-3d8452b1439fd24473fb68653cb2f7e3e0bbdb4b.zip |
Replace tabs indentation with spaces indentation
Some files are obviously external libraries, I didn't touch them
Diffstat (limited to 'src/static/js/html10n.js')
-rw-r--r-- | src/static/js/html10n.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index bee1fef3..856729b5 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -97,21 +97,21 @@ window.html10n = (function(window, document, undefined) { * MicroEvent - to make any js object an event emitter (server or browser) */ - var MicroEvent = function(){} - MicroEvent.prototype = { - bind : function(event, fct){ + var MicroEvent = function(){} + MicroEvent.prototype = { + bind: function(event, fct){ this._events = this._events || {}; - this._events[event] = this._events[event] || []; + this._events[event] = this._events[event] || []; this._events[event].push(fct); }, - unbind : function(event, fct){ + unbind: function(event, fct){ this._events = this._events || {}; - if( event in this._events === false ) return; + if( event in this._events === false ) return; this._events[event].splice(this._events[event].indexOf(fct), 1); }, - trigger : function(event /* , args... */){ + trigger: function(event /* , args... */){ this._events = this._events || {}; - if( event in this._events === false ) return; + if( event in this._events === false ) return; for(var i = 0; i < this._events[event].length; i++){ this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1)) } @@ -121,8 +121,8 @@ window.html10n = (function(window, document, undefined) { * mixin will delegate all MicroEvent.js function in the destination object * @param {Object} the object which will support MicroEvent */ - MicroEvent.mixin = function(destObject){ - var props = ['bind', 'unbind', 'trigger']; + MicroEvent.mixin = function(destObject){ + var props = ['bind', 'unbind', 'trigger']; if(!destObject) return; for(var i = 0; i < props.length; i ++){ destObject[props[i]] = MicroEvent.prototype[props[i]]; |