cleanup: Use arrow-notation for anonymous functions

Arrow notation is great, but as we only started using it recently,
we currently have a wild mix of Lang.bind(), function() and () => {}.
To make the style consistent again, change all anonymous functions
to arrow notation.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/30
This commit is contained in:
Florian Müllner
2017-12-01 20:40:32 +01:00
parent 4ee30a5445
commit 968ae427f1
14 changed files with 131 additions and 179 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ function _showHello() {
let monitor = Main.layoutManager.primaryMonitor;
global.stage.add_actor(label);
label.set_position(Math.floor (monitor.width / 2 - label.width / 2), Math.floor(monitor.height / 2 - label.height / 2));
Mainloop.timeout_add(3000, function() { label.destroy(); });
Mainloop.timeout_add(3000, () => { label.destroy(); });
}
// Put your extension initialization code here