Use api-key, when calling openweathermap.org via the menu.

openweathermap
Jens Lody 11 years ago
parent 4221fad77e
commit 0e3c13f4b3
  1. 9
      src/extension.js

@ -242,10 +242,13 @@ const WeatherMenuButton = new Lang.Class({
this.updateCities(); this.updateCities();
cityId = this.extractId(this._city); cityId = this.extractId(this._city);
} }
let url = "http://openweathermap.org";
if (cityId) if (cityId)
Util.spawn(["gnome-open", "http://openweathermap.org/city/" + cityId]); url += "/city/" + cityId;
else if (this._appid)
Util.spawn(["gnome-open", "http://openweathermap.org"]); url += "?APPID=" + this._appid;
Util.spawn(["gnome-open", url]);
})); }));
this.menu.addMenuItem(item); this.menu.addMenuItem(item);

Loading…
Cancel
Save