mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
pad_editbar: Simplify iteration
This commit is contained in:
parent
11faf6104a
commit
0d4f147349
1 changed files with 2 additions and 5 deletions
|
@ -216,9 +216,7 @@ const padeditbar = (() => {
|
|||
// hide all modules and remove highlighting of all buttons
|
||||
if (moduleName === 'none') {
|
||||
const returned = false;
|
||||
for (let i = 0; i < this.dropdowns.length; i++) {
|
||||
const thisModuleName = this.dropdowns[i];
|
||||
|
||||
for (const thisModuleName of this.dropdowns) {
|
||||
// skip the userlist
|
||||
if (thisModuleName === 'users') continue;
|
||||
|
||||
|
@ -237,8 +235,7 @@ const padeditbar = (() => {
|
|||
} else {
|
||||
// hide all modules that are not selected and remove highlighting
|
||||
// respectively add highlighting to the corresponding button
|
||||
for (let i = 0; i < this.dropdowns.length; i++) {
|
||||
const thisModuleName = this.dropdowns[i];
|
||||
for (const thisModuleName of this.dropdowns) {
|
||||
const module = $(`#${thisModuleName}`);
|
||||
|
||||
if (module.hasClass('popup-show')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue