Merge pull request #13 from Odysseus86/patch-5

Changed display of wind data
yahoo_weather
Christian Louis Gabriel METZLER 13 years ago
commit a983778ff3
  1. 7
      src/extension.js

@ -816,7 +816,12 @@ WeatherMenuButton.prototype = {
wind_unit = 'knots'; wind_unit = 'knots';
break; break;
} }
this._currentWeatherWind.text = (wind_direction && wind > 0 ? wind_direction + ' ' : '') + wind + ' ' + wind_unit; if (!wind)
this._currentWeatherWind.text = '\u2013';
else if (wind == 0 || !wind_direction)
this._currentWeatherWind.text = wind + ' ' + wind_unit;
else // i.e. wind > 0 && wind_direction
this._currentWeatherWind.text = wind_direction + ' ' + wind + ' ' + wind_unit;
// Refresh forecast // Refresh forecast
let date_string = [_('Today'), _('Tomorrow')]; let date_string = [_('Today'), _('Tomorrow')];

Loading…
Cancel
Save