diff --git a/web/secondary_toolbar.js b/web/secondary_toolbar.js index 11b9fb948..b5252151d 100644 --- a/web/secondary_toolbar.js +++ b/web/secondary_toolbar.js @@ -169,9 +169,7 @@ class SecondaryToolbar { this.toggleButton.addEventListener('click', this.toggle.bind(this)); // All items within the secondary toolbar. - for (let button in this.buttons) { - let { element, eventName, close, eventDetails, } = this.buttons[button]; - + for (const { element, eventName, close, eventDetails, } of this.buttons) { element.addEventListener('click', (evt) => { if (eventName !== null) { let details = { source: this, }; diff --git a/web/toolbar.js b/web/toolbar.js index 9f5ca2224..089c6c3f6 100644 --- a/web/toolbar.js +++ b/web/toolbar.js @@ -201,10 +201,8 @@ class Toolbar { let customScale = Math.round(pageScale * 10000) / 100; this.l10n.get('page_scale_percent', { scale: customScale, }, '{{scale}}%').then((msg) => { - let options = items.scaleSelect.options; let predefinedValueFound = false; - for (let i = 0, ii = options.length; i < ii; i++) { - let option = options[i]; + for (const option of items.scaleSelect.options) { if (option.value !== pageScaleValue) { option.selected = false; continue;