mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -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
|
// hide all modules and remove highlighting of all buttons
|
||||||
if (moduleName === 'none') {
|
if (moduleName === 'none') {
|
||||||
const returned = false;
|
const returned = false;
|
||||||
for (let i = 0; i < this.dropdowns.length; i++) {
|
for (const thisModuleName of this.dropdowns) {
|
||||||
const thisModuleName = this.dropdowns[i];
|
|
||||||
|
|
||||||
// skip the userlist
|
// skip the userlist
|
||||||
if (thisModuleName === 'users') continue;
|
if (thisModuleName === 'users') continue;
|
||||||
|
|
||||||
|
@ -237,8 +235,7 @@ const padeditbar = (() => {
|
||||||
} else {
|
} else {
|
||||||
// hide all modules that are not selected and remove highlighting
|
// hide all modules that are not selected and remove highlighting
|
||||||
// respectively add highlighting to the corresponding button
|
// respectively add highlighting to the corresponding button
|
||||||
for (let i = 0; i < this.dropdowns.length; i++) {
|
for (const thisModuleName of this.dropdowns) {
|
||||||
const thisModuleName = this.dropdowns[i];
|
|
||||||
const module = $(`#${thisModuleName}`);
|
const module = $(`#${thisModuleName}`);
|
||||||
|
|
||||||
if (module.hasClass('popup-show')) {
|
if (module.hasClass('popup-show')) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue