diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js index e2c9a9c3..d7e108d2 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js @@ -77,8 +77,8 @@ class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem { super.setActive(active, params); } - setDragEnabled(enable) { - this._dragEnabled = enable; + setDragEnabled(enabled) { + this._dragEnabled = enabled; } getDragActor() { @@ -630,7 +630,7 @@ class ApplicationsButton extends PanelMenu.Button { this.applicationsByCategory[categoryId] = []; this._loadCategory(categoryId, dir); if (this.applicationsByCategory[categoryId].length > 0) { - let categoryMenuItem = new CategoryMenuItem(this, dir); + categoryMenuItem = new CategoryMenuItem(this, dir); this.categoriesBox.add_actor(categoryMenuItem); } } diff --git a/extensions/auto-move-windows/prefs.js b/extensions/auto-move-windows/prefs.js index bd20aabe..f89a6692 100644 --- a/extensions/auto-move-windows/prefs.js +++ b/extensions/auto-move-windows/prefs.js @@ -147,13 +147,13 @@ const Widget = GObject.registerClass({ grid.attach(dialog._spin, 1, 1, 1, 1); dialog.get_content_area().add(grid); - dialog.connect('response', (dialog, id) => { + dialog.connect('response', (dlg, id) => { if (id != Gtk.ResponseType.OK) { dialog.destroy(); return; } - let appInfo = dialog._appChooser.get_app_info(); + appInfo = dialog._appChooser.get_app_info(); if (!appInfo) return; let index = Math.floor(dialog._spin.value); diff --git a/extensions/native-window-placement/extension.js b/extensions/native-window-placement/extension.js index 8d39d0f9..383322f1 100644 --- a/extensions/native-window-placement/extension.js +++ b/extensions/native-window-placement/extension.js @@ -157,7 +157,7 @@ class NaturalLayoutStrategy extends Workspace.LayoutStrategy { let xSection = Math.round((rects[i].x - bounds.x) / (bounds.width / 3)); let ySection = Math.round((rects[i].y - bounds.y) / (bounds.height / 3)); - let iCenter = rects[i].center(); + iCenter = rects[i].center(); diff[0] = 0; diff[1] = 0; if (xSection != 1 || ySection != 1) { // Remove this if you want the center to pull as well @@ -183,7 +183,7 @@ class NaturalLayoutStrategy extends Workspace.LayoutStrategy { diff[1] = bounds.y + bounds.height - iCenter[1]; } if (diff[0] != 0 || diff[1] != 0) { - let length = Math.sqrt(diff[0] * diff[0] + diff[1] * diff[1]); + length = Math.sqrt(diff[0] * diff[0] + diff[1] * diff[1]); diff[0] *= WINDOW_PLACEMENT_NATURAL_ACCURACY / length / 2; // /2 to make it less influencing than the normal center-move above diff[1] *= WINDOW_PLACEMENT_NATURAL_ACCURACY / length / 2; rects[i].translate(diff[0], diff[1]); diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js index add57bec..03189b93 100644 --- a/extensions/places-menu/placeDisplay.js +++ b/extensions/places-menu/placeDisplay.js @@ -41,9 +41,9 @@ class PlaceInfo { async _ensureMountAndLaunch(context, tryMount) { try { await this._launchDefaultForUri(this.file.get_uri(), context, null); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_MOUNTED)) { - Main.notifyError(_('Failed to launch ā€œ%sā€').format(this.name), e.message); + } catch (err) { + if (!err.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_MOUNTED)) { + Main.notifyError(_('Failed to launch ā€œ%sā€').format(this.name), err.message); return; } @@ -505,16 +505,16 @@ var PlacesManager = class { continue; let duplicate = false; - for (let i = 0; i < this._places.special.length; i++) { - if (file.equal(this._places.special[i].file)) { + for (let j = 0; i < this._places.special.length; j++) { + if (file.equal(this._places.special[j].file)) { duplicate = true; break; } } if (duplicate) continue; - for (let i = 0; i < bookmarks.length; i++) { - if (file.equal(bookmarks[i].file)) { + for (let j = 0; j < bookmarks.length; j++) { + if (file.equal(bookmarks[j].file)) { duplicate = true; break; } diff --git a/extensions/window-list/workspaceIndicator.js b/extensions/window-list/workspaceIndicator.js index 84dccacc..33b2e498 100644 --- a/extensions/window-list/workspaceIndicator.js +++ b/extensions/window-list/workspaceIndicator.js @@ -344,7 +344,7 @@ var WorkspaceIndicator = GObject.registerClass({ let item = new PopupMenu.PopupMenuItem(name); item.workspaceId = i; - item.connect('activate', (item, _event) => { + item.connect('activate', () => { this._activate(item.workspaceId); });