@ -122,9 +122,7 @@ const WEATHER_CONV_MPS_IN_KPH = 3.6;
const WEATHER _CONV _MPS _IN _KNOTS = 1.94384449 ;
const WEATHER _CONV _MPS _IN _FPS = 3.2808399 ;
// Soup session (see https://bugzilla.gnome.org/show_bug.cgi?id=661323#c64) (Simon Legner)
const _httpSession = new Soup . SessionAsync ( ) ;
Soup . Session . prototype . add _feature . call ( _httpSession , new Soup . ProxyResolverDefault ( ) ) ;
let _httpSession ;
const WeatherMenuButton = new Lang . Class ( {
Name : 'WeatherMenuButton' ,
@ -1107,6 +1105,15 @@ weather-storm.png = weather-storm-symbolic.svg
} ,
load _json _async : function ( url , params , fun ) {
if ( _httpSession == undefined ) {
if ( ExtensionUtils . versionCheck ( [ '3.6' , '3.7' ] , Config . PACKAGE _VERSION ) ) {
// Soup session (see https://bugzilla.gnome.org/show_bug.cgi?id=661323#c64) (Simon Legner)
_httpSession = new Soup . SessionAsync ( ) ;
Soup . Session . prototype . add _feature . call ( _httpSession , new Soup . ProxyResolverDefault ( ) ) ;
} else
_httpSession = new Soup . Session ( ) ;
}
let here = this ;
let message = Soup . form _request _new _from _hash ( 'GET' , url , params ) ;