From 0e3c13f4b3d634061bcc6d856ddbec5bf6655aee Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Thu, 7 Nov 2013 08:06:14 +0100 Subject: [PATCH] Use api-key, when calling openweathermap.org via the menu. --- src/extension.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/extension.js b/src/extension.js index 545cefc..c0da3b9 100644 --- a/src/extension.js +++ b/src/extension.js @@ -242,10 +242,13 @@ const WeatherMenuButton = new Lang.Class({ this.updateCities(); cityId = this.extractId(this._city); } + let url = "http://openweathermap.org"; if (cityId) - Util.spawn(["gnome-open", "http://openweathermap.org/city/" + cityId]); - else - Util.spawn(["gnome-open", "http://openweathermap.org"]); + url += "/city/" + cityId; + if (this._appid) + url += "?APPID=" + this._appid; + + Util.spawn(["gnome-open", url]); })); this.menu.addMenuItem(item);