From 9c1e16ad7dc78eb9813665fc637ec5ffe2a4d647 Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Wed, 5 Mar 2014 07:20:19 +0100 Subject: [PATCH] Make jshint happy. --- src/convenience.js | 1 + src/extension.js | 1 + src/prefs.js | 9 +++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/convenience.js b/src/convenience.js index 1fb9ede..054dafe 100644 --- a/src/convenience.js +++ b/src/convenience.js @@ -1,3 +1,4 @@ +/* jshint esnext:true */ /* -*- mode: js -*- */ /* Copyright (c) 2011-2012, Giovanni Campagna diff --git a/src/extension.js b/src/extension.js index f21fdc6..9607b3e 100644 --- a/src/extension.js +++ b/src/extension.js @@ -1,3 +1,4 @@ +/* jshint esnext:true */ /* * Idea: Grab MessageTray OSD widget, and give it new .x and .y co-ordinates. * diff --git a/src/prefs.js b/src/prefs.js index 575369f..8be8c7e 100644 --- a/src/prefs.js +++ b/src/prefs.js @@ -1,3 +1,4 @@ +/* jshint esnext:true */ const Gtk = imports.gi.Gtk; const GObject = imports.gi.GObject; const GtkBuilder = Gtk.Builder; @@ -46,7 +47,7 @@ const PanelOsdPrefsWidget = new GObject.Class({ this.xScaleTimeout = undefined; this.x_scale.connect("value-changed", Lang.bind(this, function(slider) { - if (this.xScaleTimeout != undefined) + if (this.xScaleTimeout !== undefined) Mainloop.source_remove(this.xScaleTimeout); this.xScaleTimeout = Mainloop.timeout_add(250, Lang.bind(this, function() { this.x_position = slider.get_value(); @@ -61,7 +62,7 @@ const PanelOsdPrefsWidget = new GObject.Class({ this.yScaleTimeout = undefined; this.y_scale.connect("value-changed", Lang.bind(this, function(slider) { - if (this.yScaleTimeout != undefined) + if (this.yScaleTimeout !== undefined) Mainloop.source_remove(this.yScaleTimeout); this.yScaleTimeout = Mainloop.timeout_add(250, Lang.bind(this, function() { this.y_position = slider.get_value(); @@ -90,8 +91,8 @@ const PanelOsdPrefsWidget = new GObject.Class({ this.reset_button.sensitive = this.x_reset || this.y_reset; this.reset_button.connect("clicked", Lang.bind(this, function() { - this.x_reset && this.x_scale.set_value(50); - this.y_reset && this.y_scale.set_value(100); + if (this.x_reset) this.x_scale.set_value(50); + if (this.y_reset) this.y_scale.set_value(100); }));