mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-08 05:36:09 +02:00
pad_editbar: Simplify iteration
This commit is contained in:
parent
11faf6104a
commit
0d4f147349
@ -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…
x
Reference in New Issue
Block a user