From 193d97f0118ea2153d56ba7b35ee0ff62fa74917 Mon Sep 17 00:00:00 2001 From: echicken Date: Tue, 28 Apr 2020 16:23:28 -0400 Subject: [PATCH] Garbage. --- web/sidebar/.extras/openweathermap.ssjs | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 web/sidebar/.extras/openweathermap.ssjs diff --git a/web/sidebar/.extras/openweathermap.ssjs b/web/sidebar/.extras/openweathermap.ssjs deleted file mode 100644 index c269e60..0000000 --- a/web/sidebar/.extras/openweathermap.ssjs +++ /dev/null @@ -1,23 +0,0 @@ -// Requires an API key from https://openweathermap.org/ -// Add an [openweathermap] section to ctrl/modopts.ini -// Add an api_key value to that section -(function () { - try { - load('geoip.js'); - require('openweathermap.js', 'OpenWeatherMap'); - const geoip = get_geoip( - http_request.header['x-forwarded-for'] || http_request.remote_ip - ); - const owm = new OpenWeatherMap(); - const wq = { units: 'metric', mode: 'html' }; - if (geoip.latitude && geoip.longitude) { - wq.lat = geoip.latitude; - wq.lon = geoip.longitude; - } else if (geoip.cityName) { - wq.q = geoip.cityName; - } - writeln(owm.call_api('weather', wq, true).data); - } catch (err) { - // meh - } -})();