Connect with us

Kansas

Twins fall to Royals 6-1 as Kansas City gives Bailey Ober trouble again

Published

on

Twins fall to Royals 6-1 as Kansas City gives Bailey Ober trouble again


Bailey Ober, by all measures, has been a solid major league starting pitcher throughout his four-year career. Except when he’s facing the Kansas City Royals.

Ober, in a 6-1 loss, surrendered nine hits and six runs over five innings Wednesday at Target Field, the most damage he’s allowed in a start since he faced the Royals in his season debut. Ober owns a 7.71 ERA in nine career starts against his division rival.

It’s a confounding kryptonite. Ober had good command, inducing several swings and misses with his fastball and cutter. He threw a first-pitch strike to 18 of his 24 batters. He didn’t walk anyone. It was still one of his worst starts of the year.

Ober was doomed during a four-run third inning. Bobby Witt Jr. poked an opposite-field RBI single through the right side of the infield, and Salvador Perez followed with an RBI double off the left field wall when he connected with a cutter on the outside corner. Perez has reached base at least once in 43 of his last 45 games.

Advertisement

After a running catch from Carlos Correa in left field, Nelson Velázquez crushed a full-count cutter past the center-field fence for a two-run, two-out homer.

In the fifth inning, Perez hammered a fastball for a solo homer to center, a no-doubter that Perez appreciated for a moment in the batter’s box. Two batters later, Velázquez hit another fastball into the left field seats for the third multi-homer game of his career.

Ober, who allowed nine hits and eight runs in 1⅓ innings in Kansas City on March 31, has yielded a 19.90 ERA in his two starts against Kansas City this year and a 3.02 ERA against every other team. Six of the 10 homers he’s allowed are from Royals batters.

After Ober exited, Twins relievers Steven Okert, Diego Castillo and Cole Sands combined to pitch four scoreless innings with one hit and one walk.

BOXSCORE: Kansas City 6, Twins 1

Advertisement

The Twins had a 1-0 lead in the second inning against Royals righthander Seth Lugo, who owns the lowest ERA (1.72) in the majors among starting pitchers, with contributions from the bottom three hitters in their lineup. Willi Castro lined a double down the right-field line, Carlos Santana blooped a single to center and Jose Miranda hit a sacrifice fly to the left field warning track.

Lugo, who allowed six hits and three walks in six innings, staved off potential rallies with key strikeouts. After a pair of two-out singles in the first inning, Lugo struck out Ryan Jeffers in an eight-pitch at-bat. Lugo stranded two more runners by striking out Miranda in the fourth inning.

With two runners on base and one out in the fifth inning, Lugo struck out Max Kepler on a called third strike on the 12th pitch of their at-bat. Lugo, who throws eight different pitches and used each of them in that at-bat, pumped his fist when his 93-mph sinker froze Kepler.

The Twins had only one inning when they didn’t have a batter reach base, but they went 1-for-11 with runners in scoring position. After the first two batters reached base in the bottom of the ninth inning, Correa lined out to third base before Royals reliever Carlos Hernández retired Byron Buxton and Max Kepler with a strikeout and a flyout.

Advertisement



Source link

Kansas

Multiple communities report damage, 3 people injured after tornado-producing storms

Published

on

Multiple communities report damage, 3 people injured after tornado-producing storms


KANSAS CITY, Mo. (KCTV) – Multiple communities in Kansas have had damage after reported tornadoes and severe storms.

The city of Ottawa, Kansas, says that after the National Weather Service issued a tornado warning at approximately 7:25 p.m. on Monday, April 13, a storm caused structural damage.

Hillsdale Kansas suffered storm damage from possible tornado-producing storm.

Officials say that 3 people suffered minor injuries at a home with significant damage east of Ottawa, in Franklin County. The city says that no injuries or fatalities have been reported within city limits.

Officials say the majority of the town is without power, and streetlights aren’t working. KCTV reported that Main St. from 1st to 6th does have lights back on, as of 10:36 p.m.

Advertisement

Ottawa USD 290 has cancelled school on Tuesday, April 14, due to the storm aftermath.

Multiple buildings in Hillsdale, Kansas, were damaged after reports of a tornado.(DJ Inlow)

Officials are asking community members to stay off the roadways and to stay away from downed power lines. They also say that all City and County emergency personnel are responding to the weather event.

Ottawa’s Police Chief asked people to stay home overnight as they work to clear storm debris from streets

At this time, there is no estimate as to when power will be restored in Ottawa.

In Hillsdale, Kansas, a spotter shared a photo of a tornado. Viewer photos show significant damage there, as well.

Storm damage after reported tornado in Hillsdale, Kansas
Storm damage after reported tornado in Hillsdale, Kansas(DJ Inlow)

KCTV5 will make updates as they’re made available.

Advertisement



Source link

Continue Reading

Kansas

Alert Days ahead: Multiple chances for rain, thunderstorms this week in the Kansas City metro

Published

on

Alert Days ahead: Multiple chances for rain, thunderstorms this week in the Kansas City metro


There are multiple chances for rain and thunderstorms this week, including two First Alert Weather Alert Days highlighting the potential for severe thunderstorms. The first Alert Day is Tuesday. Most of the morning and afternoon will be dry, warm, humid and windy. After 5 p.m., ongoing thunderstorms across Oklahoma and southern Kansas will begin moving northeast toward Kansas City. The risk of severe weather will increase after that time and continue through 1 a.m. Wednesday, as thunderstorms lift across areas primarily along and east of Interstate 35 in eastern Kansas and central Missouri. The primary threats are large to very large hail and damaging winds. The tornado risk is low. The severe weather potential on Wednesday depends on whether the atmosphere is able to recover and destabilize after Tuesday night’s storms, Wednesday morning rain and lingering cloud cover. A dryline and cold front will approach the region from the west during the afternoon and evening, providing the focus for showers and thunderstorms that may produce large hail and damaging winds. Another cold front will bring renewed chances for showers and thunderstorms Friday afternoon and evening, and with conditions similar to Wednesday in place, there is at least some potential for severe thunderstorms. Please keep in mind that while this is a common and favorable pattern for showers and thunderstorms, most thunderstorms this week will not produce severe weather. That said, sufficient wind shear, lift, instability and moisture on Tuesday, Wednesday and Friday will provide an environment where thunderstorms could thrive and support all types of severe weather. Check the forecast twice daily for updates, review your severe weather safety plan and have multiple ways to receive weather alerts.

There are multiple chances for rain and thunderstorms this week, including two First Alert Weather Alert Days highlighting the potential for severe thunderstorms.

The first Alert Day is Tuesday. Most of the morning and afternoon will be dry, warm, humid and windy. After 5 p.m., ongoing thunderstorms across Oklahoma and southern Kansas will begin moving northeast toward Kansas City. The risk of severe weather will increase after that time and continue through 1 a.m. Wednesday, as thunderstorms lift across areas primarily along and east of Interstate 35 in eastern Kansas and central Missouri.

Advertisement

The primary threats are large to very large hail and damaging winds. The tornado risk is low.

Advertisement

The severe weather potential on Wednesday depends on whether the atmosphere is able to recover and destabilize after Tuesday night’s storms, Wednesday morning rain and lingering cloud cover.

A dryline and cold front will approach the region from the west during the afternoon and evening, providing the focus for showers and thunderstorms that may produce large hail and damaging winds.

This KMBC 9 weather map shows that severe storms are possible around the entire Kansas City region on Wednesday afternoon and evening.

Advertisement

Another cold front will bring renewed chances for showers and thunderstorms Friday afternoon and evening, and with conditions similar to Wednesday in place, there is at least some potential for severe thunderstorms.

Please keep in mind that while this is a common and favorable pattern for showers and thunderstorms, most thunderstorms this week will not produce severe weather. That said, sufficient wind shear, lift, instability and moisture on Tuesday, Wednesday and Friday will provide an environment where thunderstorms could thrive and support all types of severe weather.

Check the forecast twice daily for updates, review your severe weather safety plan and have multiple ways to receive weather alerts.

This KMBC 9 weather map shows severe storms are possible in the entire Kansas City region on Friday.

Advertisement



Source link

Continue Reading

Kansas

Multiple chances of strong thunderstorms this week for Kansas City

Published

on

Multiple chances of strong thunderstorms this week for Kansas City


Multiple chances of strong thunderstorms this week for Kansas City

Advertisement

TODAY WAS IMPACT DAY FOR THE RAIN THAT MOVED OUT FOR THE NIGHT THOUGH. METEOROLOGIST PETE GRIGSBY JOINING ME NOW PETE. A VERY RAINY DAY AHEAD. A KIND OF A CHILL RAIN THOUGH BEFORE THESE STORMS ROLL IN. IT WAS, BUT IT WAS VERY GENTLE, KIND OF A LIGHT TO MODERATE RAINFALL AT MOST. AND YOU KNOW WHAT? IT’S WELL NEEDED RAINFALL. THOSE YOU SOUTH OF I-670. SOME OF YOU GOT POCKETS OF ABOUT A HALF AN INCH TOTAL FOR TODAY. NOT BAD. FARTHER NORTH, NOT AS MUCH, BUT STILL THE NUMBERS ARE FAIRLY IMPRESSIVE WITH SOMETHING THAT REALLY DIDN’T PRODUCE A MAJOR THUNDERSTORM. A HEAVY DOWNPOURS LIKE THAT. SO WE LIKE THAT. BUT HOWEVER, THINGS ARE ABOUT TO CHANGE AS WE DEAL WITH SOMETHING TOTALLY DIFFERENT WHEN IT COMES TO TUESDAY AND WEDNESDAY. WE MADE THEM ALERT DAYS BECAUSE SEVERE WEATHER THREATS, MOSTLY IN THE AFTERNOONS AND EVENING HOURS FOR BOTH DAYS, ANYTHING FROM WIND, HAIL, DAMAGING HAIL. OF COURSE, A LARGE SIZE AND TORNADIC THREAT IS ALSO INVOLVED WITH THAT. AS WE GET MORE INFORMATION IN, ESPECIALLY THROUGH TOMORROW, WE CAN FINE TUNE IT, ESPECIALLY WHAT WE CAN BE STACKING THE SHOW WITH. WHAT’S MORE IMPORTANT. OKAY, THAN KEEPING AN ALERT ON THIS. ALL OF EASTERN KANSAS AND MISSOURI. LOOK HOW MUCH REAL ESTATE THAT COVERS, ESPECIALLY FOR TUESDAY AND COME WEDNESDAY, IT REALLY DOESN’T CHANGE THAT MUCH. IT’S JUST KIND OF MIGRATES SLIGHTLY TO THE EAST. SO NO DOUBT TWO DAYS TO KEEP A CLOSE EYE OUT AND KEEP IT TUNED RIGHT HERE ON CHANNEL NINE FOR UPDATES. A QUIET, BEAUTIFUL NIGHT. SO DON’T WORRY ABOUT ANYTHING OVERNIGHT TONIGHT. WE’RE COMFORTABLE 69 DEGREES. OUR WIND FLOW ABOUT 16 MILES AN HOUR, AND TOMORROW MORNING WILL START OUT ABOUT 64 TO 65 FOR YOUR MORNING START HEADING FOR A VERY NICE COMFORTABLE AFTERNOON. AND THEN TUESDAY WILL BE THE KEY DAY TO KEEP AN EYE OUT. MORE ABOUT THAT OF COURSE YOUR NINE DAY FORECAST. THAT’S ALL COMING UP IN OUR KMBC NINE NEWS APP HELPS YOU STAY AHEAD OF THE RAIN. GET ALERTS SENT STRAIGHT TO YOUR PHONE AND TRACK STORMS IN REAL TIME. WITH O

After a round of beneficial rain Sunday, the focus now shifts to a more active stretch of weather across the Kansas City area.Tuesday and Wednesday are both Alert Days, with multiple chances for thunderstorms developing across eastern Kansas and western Missouri.Storms are most likely during the afternoon and evening hours both days, when conditions will be more favorable for stronger development.The main threats will be strong wind gusts and large hail, and there is also a tornado risk that cannot be ruled out.This setup covers a large part of the region, so much of the Kansas City metro could see impacts at some point during this stretch. Timing and specific impacts will become clearer as we get closer.Conditions stay quiet and warm through Monday before storm chances increase.The bottom line is to stay weather aware and make sure alerts are enabled on your phone as we head into midweek.

Advertisement

After a round of beneficial rain Sunday, the focus now shifts to a more active stretch of weather across the Kansas City area.

Tuesday and Wednesday are both Alert Days, with multiple chances for thunderstorms developing across eastern Kansas and western Missouri.

Advertisement

Storms are most likely during the afternoon and evening hours both days, when conditions will be more favorable for stronger development.

The main threats will be strong wind gusts and large hail, and there is also a tornado risk that cannot be ruled out.

This setup covers a large part of the region, so much of the Kansas City metro could see impacts at some point during this stretch.

Timing and specific impacts will become clearer as we get closer.

Conditions stay quiet and warm through Monday before storm chances increase.

Advertisement

The bottom line is to stay weather aware and make sure alerts are enabled on your phone as we head into midweek.

Advertisement

`;
}

function refreshWeatherIframe(containerId) {
var iframeId = ‘weather-iframe-‘ + containerId;
var iframe = document.getElementById(iframeId);
if (iframe && iframe.src) {
var originalSrc = iframe.src;
iframe.src = originalSrc + (originalSrc.indexOf(‘?’) > -1 ? ‘&’ : ‘?’) + ‘t=” + Date.now();
}
}

function initializeWeatherBox(container) {
var containerId = container.getAttribute(“data-container-id’);
var isWeatherBoxV2 = containerId === ‘home-weather-v2’;

function switchWeatherTab(tabName, clickedElement) {
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
tab.classList.remove(‘open’);
tab.setAttribute(‘aria-selected’, ‘false’);
});

Advertisement

clickedElement.classList.add(‘open’);
clickedElement.setAttribute(‘aria-selected’, ‘true’);

container.querySelectorAll(‘[data-content-id]’).forEach(function(content) {
content.style.display = ‘none’;
content.setAttribute(‘hidden’, ‘true’);
});

var targetContent = container.querySelector(‘[data-content-id=”‘ + tabName + ‘”]’);
if (targetContent) {
targetContent.style.display = ‘block’;
targetContent.removeAttribute(‘hidden’);
}
}

function loadWeatherData() {
// If weather data is already being loaded, wait for it
if (window.weatherDataPromise) {
window.weatherDataPromise.then(function(data) {
if (data && data.data) {
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
}
});
return;
}

var location = { zip: window.DEFAULT_ZIPCODE };

Advertisement

try {
var storedLocations = localStorage.getItem(‘hrst.zip.history’);
if (storedLocations) {
var locations = JSON.parse(storedLocations);
if (locations && locations.length > 0) {
location = locations[0];
}
}
} catch (e) {}

var apiUrl = (window.DEWY_HOSTNAME || ”) + ‘/api/v1/weather/full/’ + location.zip;

if (window.fetch) {
window.weatherDataPromise = fetch(apiUrl)
.then(function(response) { return response.json(); })
.then(function(data) {
if (data && data.data) {
var article = container.closest(‘.article–wrapper’);
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
return data;
}
})
.catch(function(error) {
console.error(‘Error loading weather:’, error);
// Reset to unknown background on error
updateWeatherBackground(‘unknown’);
});
}
}

function updateWeatherAlertsBar(weatherData) {
var weatherWatchHeader = container.querySelector(‘.weather-watch-header’);
if (!weatherWatchHeader) return;

var weatherWatchText = weatherWatchHeader.querySelector(‘.weather-watch-text’);
var weatherWatchLink = weatherWatchHeader.querySelector(‘.weather-watch-link’);

Advertisement

if (weatherData.alerts_count > 0) {
weatherWatchHeader.className=”weather-watch-header has-alerts”;
if (weatherWatchText) {
weatherWatchText.textContent = `Weather Alerts (${weatherData.alerts_count})`;
}
if (weatherWatchLink) {
if (!weatherWatchLink.getAttribute(‘data-initial-href’)) {
weatherWatchLink.setAttribute(‘data-initial-href’, weatherWatchLink.getAttribute(‘href’));
weatherWatchLink.setAttribute(‘data-initial-onclick’, weatherWatchLink.getAttribute(‘onclick’) || ”);
}
weatherWatchLink.setAttribute(‘href’, “https://www.kmbc.com/alerts”);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘mobile-weather’, “https://www.kmbc.com/alerts”);”);
}
} else {
weatherWatchHeader.className=”weather-watch-header”;
if (weatherWatchText) {
weatherWatchText.textContent = containerId === ‘home-weather-v2’ ? ‘Watch Latest Forecast’ : ‘Latest Forecast’;
}
if (weatherWatchLink) {
var initialHref = weatherWatchLink.getAttribute(‘data-initial-href’);
var initialOnclick = weatherWatchLink.getAttribute(‘data-initial-onclick’);
if (initialHref) {
weatherWatchLink.setAttribute(‘href’, initialHref);
}
if (initialOnclick) {
weatherWatchLink.setAttribute(‘onclick’, initialOnclick);
}
}
}
}

function updateCurrentWeather(weatherData) {
if (weatherData.current) {
var tempValue = weatherData.current.temp_f || ”;
var skyValue = weatherData.current.sky || ”;
var feelsLikeValue = weatherData.current.feels_like_f || weatherData.current.temp_f || ”;

var tempEl = container.querySelector(‘.weather-grid–current-temp-value’);
if (tempEl) {
tempEl.textContent = tempValue;
tempEl.setAttribute(‘aria-label’, tempValue + ‘ degrees Fahrenheit’);
}

var iconEl = container.querySelector(‘.weather-grid–current-icon’);
if (iconEl && weatherData.current.icon_name) {
iconEl.className=”weather-grid–current-icon weather-current-icon icon icon-weather-” + weatherData.current.icon_name;
}

var skyEl = container.querySelector(‘.weather-grid–sky’);
if (skyEl) {
skyEl.textContent = skyValue;
skyEl.setAttribute(‘aria-label’, ‘Current condition: ‘ + skyValue);
}

Advertisement

var feelsEl = container.querySelector(‘.weather-grid–feels’);
if (feelsEl) {
feelsEl.textContent = feelsLikeValue + ‘°F’;
feelsEl.setAttribute(‘aria-label’, feelsLikeValue + ‘ degrees Fahrenheit’);
}

var weatherContainer = container.querySelector(‘.weather-temp-container’);
if (weatherContainer) {
var summary = ‘Current temperature ‘ + tempValue + ‘ degrees Fahrenheit, ‘ +
skyValue + ‘, feels like ‘ + feelsLikeValue + ‘ degrees’;
weatherContainer.setAttribute(‘aria-label’, summary);
}

updateWeatherBackground(weatherData.current.icon_name);
}
}

function updateWeatherBackground(iconName) {
try {
var bgPath = weatherImages.backgrounds[iconName] || weatherImages.backgrounds.unknown;
container.style.backgroundImage=”url(” + bgPath + ‘)’;
} catch (e) {
console.log(‘Error updating weather background:’, e);
}
}

function updateForecastTabs(weatherData) {
var visibleItems = isWeatherBoxV2 ? 6 : 5;

Advertisement

if (weatherData.hourly) {
var hourlyContainer = container.querySelector(‘.weather-hourly-forecast’);
if (hourlyContainer) {
var html=””;
var maxHours = Math.min(visibleItems, weatherData.hourly.length);

for (var i = 0; i 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex

`;
}

function refreshWeatherIframe(containerId) {
var iframeId = ‘weather-iframe-‘ + containerId;
var iframe = document.getElementById(iframeId);
if (iframe && iframe.src) {
var originalSrc = iframe.src;
iframe.src = originalSrc + (originalSrc.indexOf(‘?’) > -1 ? ‘&’ : ‘?’) + ‘t=” + Date.now();
}
}

function initializeWeatherBox(container) {
var containerId = container.getAttribute(“data-container-id’);
var isWeatherBoxV2 = containerId === ‘home-weather-v2’;

Advertisement

function switchWeatherTab(tabName, clickedElement) {
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
tab.classList.remove(‘open’);
tab.setAttribute(‘aria-selected’, ‘false’);
});

clickedElement.classList.add(‘open’);
clickedElement.setAttribute(‘aria-selected’, ‘true’);

container.querySelectorAll(‘[data-content-id]’).forEach(function(content) {
content.style.display = ‘none’;
content.setAttribute(‘hidden’, ‘true’);
});

var targetContent = container.querySelector(‘[data-content-id=”‘ + tabName + ‘”]’);
if (targetContent) {
targetContent.style.display = ‘block’;
targetContent.removeAttribute(‘hidden’);
}
}

function loadWeatherData() {
// If weather data is already being loaded, wait for it
if (window.weatherDataPromise) {
window.weatherDataPromise.then(function(data) {
if (data && data.data) {
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
}
});
return;
}

Advertisement

var location = { zip: window.DEFAULT_ZIPCODE };

try {
var storedLocations = localStorage.getItem(‘hrst.zip.history’);
if (storedLocations) {
var locations = JSON.parse(storedLocations);
if (locations && locations.length > 0) {
location = locations[0];
}
}
} catch (e) {}

var apiUrl = (window.DEWY_HOSTNAME || ”) + ‘/api/v1/weather/full/’ + location.zip;

if (window.fetch) {
window.weatherDataPromise = fetch(apiUrl)
.then(function(response) { return response.json(); })
.then(function(data) {
if (data && data.data) {
var article = container.closest(‘.article–wrapper’);
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
return data;
}
})
.catch(function(error) {
console.error(‘Error loading weather:’, error);
// Reset to unknown background on error
updateWeatherBackground(‘unknown’);
});
}
}

function updateWeatherAlertsBar(weatherData) {
var weatherWatchHeader = container.querySelector(‘.weather-watch-header’);
if (!weatherWatchHeader) return;

Advertisement

var weatherWatchText = weatherWatchHeader.querySelector(‘.weather-watch-text’);
var weatherWatchLink = weatherWatchHeader.querySelector(‘.weather-watch-link’);

if (weatherData.alerts_count > 0) {
weatherWatchHeader.className=”weather-watch-header has-alerts”;
if (weatherWatchText) {
weatherWatchText.textContent = `Weather Alerts (${weatherData.alerts_count})`;
}
if (weatherWatchLink) {
if (!weatherWatchLink.getAttribute(‘data-initial-href’)) {
weatherWatchLink.setAttribute(‘data-initial-href’, weatherWatchLink.getAttribute(‘href’));
weatherWatchLink.setAttribute(‘data-initial-onclick’, weatherWatchLink.getAttribute(‘onclick’) || ”);
}
weatherWatchLink.setAttribute(‘href’, “https://www.kmbc.com/alerts”);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘sidelist-weather’, “https://www.kmbc.com/alerts”);”);
}
} else {
weatherWatchHeader.className=”weather-watch-header”;
if (weatherWatchText) {
weatherWatchText.textContent = containerId === ‘home-weather-v2’ ? ‘Watch Latest Forecast’ : ‘Latest Forecast’;
}
if (weatherWatchLink) {
var initialHref = weatherWatchLink.getAttribute(‘data-initial-href’);
var initialOnclick = weatherWatchLink.getAttribute(‘data-initial-onclick’);
if (initialHref) {
weatherWatchLink.setAttribute(‘href’, initialHref);
}
if (initialOnclick) {
weatherWatchLink.setAttribute(‘onclick’, initialOnclick);
}
}
}
}

function updateCurrentWeather(weatherData) {
if (weatherData.current) {
var tempValue = weatherData.current.temp_f || ”;
var skyValue = weatherData.current.sky || ”;
var feelsLikeValue = weatherData.current.feels_like_f || weatherData.current.temp_f || ”;

var tempEl = container.querySelector(‘.weather-grid–current-temp-value’);
if (tempEl) {
tempEl.textContent = tempValue;
tempEl.setAttribute(‘aria-label’, tempValue + ‘ degrees Fahrenheit’);
}

var iconEl = container.querySelector(‘.weather-grid–current-icon’);
if (iconEl && weatherData.current.icon_name) {
iconEl.className=”weather-grid–current-icon weather-current-icon icon icon-weather-” + weatherData.current.icon_name;
}

Advertisement

var skyEl = container.querySelector(‘.weather-grid–sky’);
if (skyEl) {
skyEl.textContent = skyValue;
skyEl.setAttribute(‘aria-label’, ‘Current condition: ‘ + skyValue);
}

var feelsEl = container.querySelector(‘.weather-grid–feels’);
if (feelsEl) {
feelsEl.textContent = feelsLikeValue + ‘°F’;
feelsEl.setAttribute(‘aria-label’, feelsLikeValue + ‘ degrees Fahrenheit’);
}

var weatherContainer = container.querySelector(‘.weather-temp-container’);
if (weatherContainer) {
var summary = ‘Current temperature ‘ + tempValue + ‘ degrees Fahrenheit, ‘ +
skyValue + ‘, feels like ‘ + feelsLikeValue + ‘ degrees’;
weatherContainer.setAttribute(‘aria-label’, summary);
}

updateWeatherBackground(weatherData.current.icon_name);
}
}

function updateWeatherBackground(iconName) {
try {
var bgPath = weatherImages.backgrounds[iconName] || weatherImages.backgrounds.unknown;
container.style.backgroundImage=”url(” + bgPath + ‘)’;
} catch (e) {
console.log(‘Error updating weather background:’, e);
}
}

Advertisement

function updateForecastTabs(weatherData) {
var visibleItems = isWeatherBoxV2 ? 6 : 5;

if (weatherData.hourly) {
var hourlyContainer = container.querySelector(‘.weather-hourly-forecast’);
if (hourlyContainer) {
var html=””;
var maxHours = Math.min(visibleItems, weatherData.hourly.length);

for (var i = 0; i 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex

Loading more articles…



Source link

Advertisement
Continue Reading

Trending