From c58c6990e0bb994b911c10a485f17c212f3a0f6e Mon Sep 17 00:00:00 2001 From: buffbears <54551697+buffbears@users.noreply.github.com> Date: Thu, 1 Apr 2021 22:05:28 -0400 Subject: [PATCH] Delete groupull.js --- webroot/groupull.js | 75 --------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 webroot/groupull.js diff --git a/webroot/groupull.js b/webroot/groupull.js deleted file mode 100644 index 318a2b2..0000000 --- a/webroot/groupull.js +++ /dev/null @@ -1,75 +0,0 @@ -function GroupDataManager() { - var locations = - [ - {name:'Chicago', n2:'IL'}, - {name:'Minneapolis', n2:'MN'}, - {name:'Tempe', n2:'AZ'}, - {name:'Fargo', n2:'ND'}, - {name:'North Hollywood', n2:'CA'}, - {name:'Los Angeles', n2:'CA'}, - {name:'Huntington Beach'}, - {name:'Las Vegas', n2:'NV'}, - {name:'Honolulu', n2:'HI'}, - {name:'Orlando', n2:'FL'}, - {name:'New York', n2:'NY'}, - {name:'Napa', n2:'CA'}, - {name:'Montego Bay', n2:''}, - {name:'Kona', n2:'HI'}, - {name:'Kalipaki Beach', n2:''}, - {name:'Ixtapa', n2:'MX'} - ] - ; - - checkRefresh(); - setInterval(checkRefresh, 300000); - - - // check to see if data needs to be refreshed - function checkRefresh() { - var woeid, location; - - for (location of locations) { - - // check the expiration - if (location.hasOwnProperty('xdate') && dateFns.isFuture(location.xdate)) { continue; } - - woeid = location.hasOwnProperty('woeid') ? location.woeid : ''; - - - // woeid is the id for the location to pull data for - var url = 'https://api.openweathermap.org/data/2.5/weather?q='+ location.name + '&appid=putkeyhere&units=imperial' - - pullData(url, location); - - } - - } - - function pullData(url, location) { - var $span; - - // ajax the latest observation - $.getJSON(url, function(data) { - location.data = data; - - if ( !location.hasOwnProperty('woeid') ) { - location.woeid = location.data.id; - $span = $("").appendTo('#marquee-now'); - } else { - $span = $('#marquee-now>span#' + location.woeid); - } - - // display the current info - $span.text(location.name + ': ' + Math.round(parseInt(location.data.main.temp)) + ' ' + location.data.weather[0].description.toLowerCase()); - - - // set the expiration date/time - location.xdate = dateFns.addMinutes(location.data.lastBuildDate, location.data.ttl); - - }); - - } - - -} -var groupDataManager = new GroupDataManager;