diff --git a/js/misc/jsParse.js b/js/misc/jsParse.js
index 15a34c975..c92465fc2 100644
--- a/js/misc/jsParse.js
+++ b/js/misc/jsParse.js
@@ -24,8 +24,7 @@ function getCompletions(text, commandHeader, globalCompletionList) {
[expr_, base, attrHead] = matches;
methods = getPropertyNamesFromExpression(base, commandHeader).filter(
- attr => attr.slice(0, attrHead.length) == attrHead
- );
+ attr => attr.slice(0, attrHead.length) === attrHead);
}
// Look for the empty expression or partially entered words
@@ -34,8 +33,7 @@ function getCompletions(text, commandHeader, globalCompletionList) {
if (text == '' || matches) {
[expr_, attrHead] = matches;
methods = globalCompletionList.filter(
- attr => attr.slice(0, attrHead.length) == attrHead
- );
+ attr => attr.slice(0, attrHead.length) === attrHead);
}
}
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 1c35a001e..5cebc1c83 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -681,8 +681,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
// Cache the window list now; we don't handle dynamic changes here,
// and we don't want to be continually retrieving it
appIcon.cachedWindows = allWindows.filter(
- w => windowTracker.get_window_app(w) == appIcon.app
- );
+ w => windowTracker.get_window_app(w) === appIcon.app);
if (appIcon.cachedWindows.length > 0)
this._addIcon(appIcon);
}
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 8139fe949..99a023fa2 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -669,8 +669,7 @@ var AllView = GObject.registerClass({
this._canScroll = true;
this._scrollTimeoutId = 0;
return GLib.SOURCE_REMOVE;
- }
- );
+ });
return Clutter.EVENT_STOP;
}
@@ -1323,8 +1322,7 @@ var AppSearchProvider = class AppSearchProvider {
return app && this._parentalControlsManager.shouldShowApp(app.app_info);
});
results = results.concat(group.sort(
- (a, b) => usage.compare(a, b)
- ));
+ (a, b) => usage.compare(a, b)));
});
results = results.concat(this._systemActions.getMatchingActions(terms));
@@ -2498,14 +2496,12 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
this.removeAll();
let windows = this._source.app.get_windows().filter(
- w => !w.skip_taskbar
- );
+ w => !w.skip_taskbar);
if (windows.length > 0) {
this.addMenuItem(
/* Translators: This is the heading of a list of open windows */
- new PopupMenu.PopupSeparatorMenuItem(_("Open Windows"))
- );
+ new PopupMenu.PopupSeparatorMenuItem(_('Open Windows')));
}
windows.forEach(window => {
diff --git a/js/ui/audioDeviceSelection.js b/js/ui/audioDeviceSelection.js
index 15727f4f3..1e9cb11fe 100644
--- a/js/ui/audioDeviceSelection.js
+++ b/js/ui/audioDeviceSelection.js
@@ -147,9 +147,8 @@ var AudioDeviceSelectionDBus = class AudioDeviceSelectionDBus {
_onDeviceSelected(dialog, device) {
let connection = this._dbusImpl.get_connection();
let info = this._dbusImpl.get_info();
- let deviceName = Object.keys(AudioDevice).filter(
- dev => AudioDevice[dev] == device
- )[0].toLowerCase();
+ const deviceName = Object.keys(AudioDevice)
+ .filter(dev => AudioDevice[dev] === device)[0].toLowerCase();
connection.emit_signal(this._audioSelectionDialog._sender,
this._dbusImpl.get_object_path(),
info ? info.name : null,
diff --git a/js/ui/components/__init__.js b/js/ui/components/__init__.js
index 2813e51af..74300136b 100644
--- a/js/ui/components/__init__.js
+++ b/js/ui/components/__init__.js
@@ -13,17 +13,13 @@ var ComponentManager = class {
_sessionUpdated() {
let newEnabledComponents = Main.sessionMode.components;
- newEnabledComponents.filter(
- name => !this._enabledComponents.includes(name)
- ).forEach(name => {
- this._enableComponent(name);
- });
+ newEnabledComponents
+ .filter(name => !this._enabledComponents.includes(name))
+ .forEach(name => this._enableComponent(name));
- this._enabledComponents.filter(
- name => !newEnabledComponents.includes(name)
- ).forEach(name => {
- this._disableComponent(name);
- });
+ this._enabledComponents
+ .filter(name => !newEnabledComponents.includes(name))
+ .forEach(name => this._disableComponent(name));
this._enabledComponents = newEnabledComponents;
}
diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js
index cfa42834b..cc7b41274 100644
--- a/js/ui/components/autorunManager.js
+++ b/js/ui/components/autorunManager.js
@@ -125,8 +125,7 @@ var ContentTypeDiscoverer = class {
_emitCallback(mount, contentTypes = []) {
// we're not interested in win32 software content types here
contentTypes = contentTypes.filter(
- type => type != 'x-content/win32-software'
- );
+ type => type !== 'x-content/win32-software');
let apps = [];
contentTypes.forEach(type => {
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 4cce0c52d..1a34f19e9 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -463,19 +463,15 @@ var ExtensionManager = class {
// Find and enable all the newly enabled extensions: UUIDs found in the
// new setting, but not in the old one.
- newEnabledExtensions.filter(
- uuid => !this._enabledExtensions.includes(uuid)
- ).forEach(uuid => {
- this._callExtensionEnable(uuid);
- });
+ newEnabledExtensions
+ .filter(uuid => !this._enabledExtensions.includes(uuid))
+ .forEach(uuid => this._callExtensionEnable(uuid));
// Find and disable all the newly disabled extensions: UUIDs found in the
// old setting, but not in the new one.
- this._extensionOrder.filter(
- uuid => !newEnabledExtensions.includes(uuid)
- ).reverse().forEach(uuid => {
- this._callExtensionDisable(uuid);
- });
+ this._extensionOrder
+ .filter(uuid => !newEnabledExtensions.includes(uuid))
+ .reverse().forEach(uuid => this._callExtensionDisable(uuid));
this._enabledExtensions = newEnabledExtensions;
}
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index d26fabc9f..7ce866802 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -935,8 +935,7 @@ var EmojiSelection = GObject.registerClass({
this.add_child(this._emojiPager);
this._pageIndicator = new PageIndicators.PageIndicators(
- Clutter.Orientation.HORIZONTAL
- );
+ Clutter.Orientation.HORIZONTAL);
this.add_child(this._pageIndicator);
this._pageIndicator.setReactive(false);
diff --git a/js/ui/lightbox.js b/js/ui/lightbox.js
index 4f265af42..9aaef1aeb 100644
--- a/js/ui/lightbox.js
+++ b/js/ui/lightbox.js
@@ -27,13 +27,11 @@ var RadialShaderEffect = GObject.registerClass({
'brightness': GObject.ParamSpec.float(
'brightness', 'brightness', 'brightness',
GObject.ParamFlags.READWRITE,
- 0, 1, 1
- ),
+ 0, 1, 1),
'sharpness': GObject.ParamSpec.float(
'sharpness', 'sharpness', 'sharpness',
GObject.ParamFlags.READWRITE,
- 0, 1, 0
- ),
+ 0, 1, 0),
},
}, class RadialShaderEffect extends Shell.GLSLEffect {
_init(params) {
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index 6ef8ddae3..ba8872891 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -39,8 +39,7 @@ function _getAutoCompleteGlobalKeywords() {
const keywords = ['true', 'false', 'null', 'new'];
// Don't add the private properties of globalThis (i.e., ones starting with '_')
const windowProperties = Object.getOwnPropertyNames(globalThis).filter(
- a => a.charAt(0) != '_'
- );
+ a => a.charAt(0) !== '_');
const headerProperties = JsParse.getDeclaredConstants(commandHeader);
return keywords.concat(windowProperties).concat(headerProperties);
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index 1c935b9c9..692cb1022 100644
--- a/js/ui/magnifier.js
+++ b/js/ui/magnifier.js
@@ -643,8 +643,7 @@ var Magnifier = class Magnifier {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
this._zoomRegions[0].setClampScrollingAtEdges(
- !this._settings.get_boolean(CLAMP_MODE_KEY)
- );
+ !this._settings.get_boolean(CLAMP_MODE_KEY));
}
}
@@ -652,8 +651,7 @@ var Magnifier = class Magnifier {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
this._zoomRegions[0].setMouseTrackingMode(
- this._settings.get_enum(MOUSE_TRACKING_KEY)
- );
+ this._settings.get_enum(MOUSE_TRACKING_KEY));
}
}
@@ -661,8 +659,7 @@ var Magnifier = class Magnifier {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
this._zoomRegions[0].setFocusTrackingMode(
- this._settings.get_enum(FOCUS_TRACKING_KEY)
- );
+ this._settings.get_enum(FOCUS_TRACKING_KEY));
}
}
@@ -670,8 +667,7 @@ var Magnifier = class Magnifier {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
this._zoomRegions[0].setCaretTrackingMode(
- this._settings.get_enum(CARET_TRACKING_KEY)
- );
+ this._settings.get_enum(CARET_TRACKING_KEY));
}
}
@@ -679,8 +675,7 @@ var Magnifier = class Magnifier {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
this._zoomRegions[0].setInvertLightness(
- this._settings.get_boolean(INVERT_LIGHTNESS_KEY)
- );
+ this._settings.get_boolean(INVERT_LIGHTNESS_KEY));
}
}
@@ -688,8 +683,7 @@ var Magnifier = class Magnifier {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
this._zoomRegions[0].setColorSaturation(
- this._settings.get_double(COLOR_SATURATION_KEY)
- );
+ this._settings.get_double(COLOR_SATURATION_KEY));
}
}
@@ -1941,9 +1935,8 @@ var MagShaderEffects = class MagShaderEffects {
// it modifies the brightness and/or contrast.
let [cRed, cGreen, cBlue] = this._brightnessContrast.get_contrast();
this._brightnessContrast.set_enabled(
- bRed != NO_CHANGE || bGreen != NO_CHANGE || bBlue != NO_CHANGE ||
- cRed != NO_CHANGE || cGreen != NO_CHANGE || cBlue != NO_CHANGE
- );
+ bRed !== NO_CHANGE || bGreen !== NO_CHANGE || bBlue !== NO_CHANGE ||
+ cRed !== NO_CHANGE || cGreen !== NO_CHANGE || cBlue !== NO_CHANGE);
}
/**
@@ -1970,8 +1963,7 @@ var MagShaderEffects = class MagShaderEffects {
// a null first argument.
let [bRed, bGreen, bBlue] = this._brightnessContrast.get_brightness();
this._brightnessContrast.set_enabled(
- cRed != NO_CHANGE || cGreen != NO_CHANGE || cBlue != NO_CHANGE ||
- bRed != NO_CHANGE || bGreen != NO_CHANGE || bBlue != NO_CHANGE
- );
+ cRed !== NO_CHANGE || cGreen !== NO_CHANGE || cBlue !== NO_CHANGE ||
+ bRed !== NO_CHANGE || bGreen !== NO_CHANGE || bBlue !== NO_CHANGE);
}
};
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index f4ceb0ae7..dc5ed9ce1 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1160,8 +1160,7 @@ var MessageTray = GObject.registerClass({
this._onNotificationDestroy.bind(this));
this._notificationQueue.push(notification);
this._notificationQueue.sort(
- (n1, n2) => n2.urgency - n1.urgency
- );
+ (n1, n2) => n2.urgency - n1.urgency);
this.emit('queue-changed');
}
}
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 2e6b93da6..39ca92c24 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -400,8 +400,7 @@ var Overview = class {
_getDesktopClone() {
let windows = global.get_window_actors().filter(
- w => w.meta_window.get_window_type() == Meta.WindowType.DESKTOP
- );
+ w => w.meta_window.get_window_type() === Meta.WindowType.DESKTOP);
if (windows.length == 0)
return null;
diff --git a/js/ui/panel.js b/js/ui/panel.js
index e4f20daa6..1c6e3f368 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -1153,10 +1153,9 @@ class Panel extends St.Widget {
_getDraggableWindowForPosition(stageX) {
let workspaceManager = global.workspace_manager;
- let workspace = workspaceManager.get_active_workspace();
- let allWindowsByStacking = global.display.sort_windows_by_stacking(
- workspace.list_windows()
- ).reverse();
+ const windows = workspaceManager.get_active_workspace().list_windows();
+ const allWindowsByStacking =
+ global.display.sort_windows_by_stacking(windows).reverse();
return allWindowsByStacking.find(metaWindow => {
let rect = metaWindow.get_frame_rect();
diff --git a/js/ui/search.js b/js/ui/search.js
index f9125123e..1c9199538 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -220,8 +220,7 @@ var SearchResultsBase = GObject.registerClass({
_ensureResultActors(results, callback) {
let metasNeeded = results.filter(
- resultId => this._resultDisplays[resultId] === undefined
- );
+ resultId => this._resultDisplays[resultId] === undefined);
if (metasNeeded.length === 0) {
callback(true);
diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js
index dc620a09d..2956c0e96 100644
--- a/js/ui/shellMountOperation.js
+++ b/js/ui/shellMountOperation.js
@@ -295,8 +295,8 @@ var ShellMountPasswordDialog = GObject.registerClass({
this._keyfilesLabel = new St.Label({ visible: false });
this._keyfilesLabel.clutter_text.set_markup(
/* Translators: %s is the Disks application */
- _("To unlock a volume that uses keyfiles, use the %s utility instead.").format(disksApp.get_name())
- );
+ _('To unlock a volume that uses keyfiles, use the %s utility instead.')
+ .format(disksApp.get_name()));
this._keyfilesLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._keyfilesLabel.clutter_text.line_wrap = true;
content.add_child(this._keyfilesLabel);
@@ -464,8 +464,7 @@ var ShellMountPasswordDialog = GObject.registerClass({
/* Translators: %s is the Disks application */
_("Unable to start %s").format(app.get_name()),
/* Translators: %s is the Disks application */
- _("Couldn’t find the %s application").format(app.get_name())
- );
+ _('Couldn’t find the %s application').format(app.get_name()));
}
this._onCancelButton();
}
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 5bd81f187..642e1a104 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -716,8 +716,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
let connections = client.get_connections();
this._connections = connections.filter(
- connection => device.connection_valid(connection)
- );
+ connection => device.connection_valid(connection));
this._apAddedId = device.connect('access-point-added', this._accessPointAdded.bind(this));
this._apRemovedId = device.connect('access-point-removed', this._accessPointRemoved.bind(this));
@@ -1863,8 +1862,7 @@ class Indicator extends PanelMenu.SystemIndicator {
_syncVpnConnections() {
let activeConnections = this._client.get_active_connections() || [];
let vpnConnections = activeConnections.filter(
- a => a instanceof NM.VpnConnection
- );
+ a => a instanceof NM.VpnConnection);
vpnConnections.forEach(a => {
ensureActiveConnectionProps(a);
});
diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index 279ebcf0c..e64b62cf4 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -82,8 +82,7 @@ class Indicator extends PanelMenu.SystemIndicator {
});
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
- 'gnome-control-center.desktop'
- );
+ 'gnome-control-center.desktop');
if (app) {
let [icon, name] = [app.app_info.get_icon().names[0],
app.get_name()];
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 52ea5fdbf..942b87449 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -819,8 +819,7 @@ class WorkspacesDisplay extends St.Widget {
this._canScroll = true;
this._scrollTimeoutId = 0;
return GLib.SOURCE_REMOVE;
- }
- );
+ });
return Clutter.EVENT_STOP;
}