mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
pad_editbar: Use arrow functions for callbacks, IIFEs
This commit is contained in:
parent
bdaa66c346
commit
b884628a5a
1 changed files with 4 additions and 4 deletions
|
@ -78,7 +78,7 @@ ToolbarItem.prototype.bind = function (callback) {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const padeditbar = (function () {
|
const padeditbar = (() => {
|
||||||
const syncAnimationFn = () => {
|
const syncAnimationFn = () => {
|
||||||
const SYNCING = -100;
|
const SYNCING = -100;
|
||||||
const DONE = 100;
|
const DONE = 100;
|
||||||
|
@ -166,8 +166,8 @@ const padeditbar = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
// When editor is scrolled, we add a class to style the editbar differently
|
// When editor is scrolled, we add a class to style the editbar differently
|
||||||
$('iframe[name="ace_outer"]').contents().scroll(function () {
|
$('iframe[name="ace_outer"]').contents().scroll((ev) => {
|
||||||
$('#editbar').toggleClass('editor-scrolled', $(this).scrollTop() > 2);
|
$('#editbar').toggleClass('editor-scrolled', $(ev.currentTarget).scrollTop() > 2);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
isEnabled: () => true,
|
isEnabled: () => true,
|
||||||
|
@ -489,6 +489,6 @@ const padeditbar = (function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}());
|
})();
|
||||||
|
|
||||||
exports.padeditbar = padeditbar;
|
exports.padeditbar = padeditbar;
|
||||||
|
|
Loading…
Reference in a new issue