yahoo_weather
Neroth 13 years ago
parent 63336470ab
commit eefb40eeaa
  1. 6
      src/weather-settings.js.in

@ -103,7 +103,7 @@ WeatherSetting.prototype =
var testLocation = function(location)
{
that.loadJsonAsync(encodeURI("http://query.yahooapis.com/v1/public/yql?format=json&q=select woeid from geo.places where text = '"+location+"' limit 1"),function()
that.loadJsonAsync(encodeURI('http://query.yahooapis.com/v1/public/yql?format=json&q=select woeid from geo.places where text = "'+location+'" limit 1'),function()
{
d.sensitive = 0;
var city = arguments[0].query;
@ -118,7 +118,7 @@ WeatherSetting.prototype =
var location = entry.get_text();
testLocation(location);
that.loadJsonAsync(encodeURI("http://query.yahooapis.com/v1/public/yql?q=select woeid,name,admin1,country from geo.places where text = '*"+location+"*' or text = '"+location+"' limit 10&format=json"),function()
that.loadJsonAsync(encodeURI('http://query.yahooapis.com/v1/public/yql?q=select woeid,name,admin1,country from geo.places where text = "*'+location+'*" or text = "'+location+'" limit 10&format=json'),function()
{
var city = arguments[0].query;
if(typeof city == "object" && typeof city.results == "object")
@ -160,7 +160,7 @@ WeatherSetting.prototype =
dialog.signal.response.connect(function(w, response_id) {
if(response_id)
{
that.loadJsonAsync(encodeURI("http://query.yahooapis.com/v1/public/yql?format=json&q=select woeid,name,admin1,country from geo.places where text = '"+entry.get_text()+"' limit 1"),function()
that.loadJsonAsync(encodeURI('http://query.yahooapis.com/v1/public/yql?format=json&q=select woeid,name,admin1,country from geo.places where text = "'+entry.get_text()+'" limit 1'),function()
{
var city = arguments[0].query;
if(typeof city == "object" && typeof city.results == "object")

Loading…
Cancel
Save