Connect with us

Boston, MA

Toronto Raptors (43-34) at Boston Celtics (52-25) Game #78 4/5/26

Published

on

Toronto Raptors (43-34) at Boston Celtics (52-25) Game #78 4/5/26


Toronto Raptors (43-34) at Boston Celtics (52-25)
Sunday, April 5, 2026
3:30 PM ET
Regular Season Game #78 Home Game #38
TV: NBCSB, Sportsnet, NBA-TV
Radio: 98.5 Sports Hub,TSN 1050, Sirius XM
TD Garden

The Celtics return home to take on the division rival Toronto Raptors. This is the 4th, and final meeting between these two teams this season. The Celtics won 121-113 on December 7 in Toronto. They won 112-96 on December 20, also in Toronto. They won 125-117 on January 9 in Boston. The Celtics have won their last 8 games against the Raptors in Boston. The Celtics won the series 3-1 last season, losing one game in Toronto. The Celtics are 76-43 overall all time and they are 45-14 in games played in Boston.

The Raptors made 2 minor deals at the trade deadline . They traded Ochai Agbaji to the Clippers for Chris Paul, who they then waived and CP3 chose to retire. Similar to several of the Celtics deadline deals, this was to bring the Raptors under the tax line. They also traded a second round pick to the Warriors for Trayce Jackson-Davis to fill the need for a back up center.

The Celtics are 2nd in the East, 4.5 games behind 1st place Detroit. They are 2.5 games ahead of 3rd place New York, 4 games ahead of 4th place Cleveland, 7.5 games ahead of 5th place Atlanta, and 9 games ahead of 6th place Toronto and 9.5 games ahead of 7th place Philadelphia. The Celtics are 33-15 against Eastern Conference opponents. They are 26-11 at home and 8-2 in their last 10 games. They have won their last 2 games.

Advertisement

The Raptors are 6th in the East, 6.5 games behind 3rd place New York, 5 games behind 4th place Cleveland, and 1.5 games behind 5th place Atlanta. They are half a game ahead of 7th place Philadelphia, 1.5 games ahead of 8th place Charlotte, and 2 games ahead of 9th place Orlando. They are 30-17 against Eastern Conference opponents. They are 22-17 on the road and 5-5 in their last 10 games. They are coming off a win in their last game.

After this game at home against Toronto they will host Charlotte before one game on the road at New York. They will finish the season with 2 games at home against New Orleans and Orlando. After this game on the road at Boston for Toronto, they will return home to play 2 games against Miami. They will then play at New York before finishing the season at home against Brooklyn.

After being out 4 weeks due to surgery to stabilize a fracture in his right ring finger, Nikola Vucevic has been upgraded to questionable for this game. His status will be a game time decision. For the Raptors, Chucky Hepburn is out due to a torn meniscus in his right knee. Immanuel Quickley will miss his eighth straight game due to right foot plantar fasciitis.

Probable Starting Matchups
PG: Derrick White vs Ja’Kobe Walter

Derrick White
NBAE via Getty Images
Advertisement

Ja’Kobe Walter
NBAE via Getty Images

SG: Jaylen Brown vs RJ Barrett

Jaylen Brown
Getty Images

RJ Barrett
NBAE via Getty Images

SF: Sam Hauser vs Brandon Ingram

Sam Hauser
NBAE via Getty Images

Brandon Ingram
NBAE via Getty Images

PF: Jayson Tatum vs Scottie Barnes

Jayson Tatum
NBAE via Getty Images

Scottie Barnes
NBAE via Getty Images

C: Neemias Queta vs Jakob Poeltl

Neemias Queta

Neemias Queta
Getty Images

Jakob Poeltl
NBAE via Getty Images

Celtics Reserves
Payton Pritchard
Hugo Gonzalez
Luka Garza
Amare Williams
Jordan Walsh
Baylor Scheierman
Max Shulga
John Tonje
Ron Harper, Jr

Advertisement

2-Way Players
None

Injuries/Out

Nikola Vucevic (finger) questionable

Head Coach

Joe Mazzulla

Raptors Reserves
Jamison Battle
Gradey Dick
Trayce Jackson-Davis
Sandro Mamukelashvili
Jonathan Mogbo
Collin Murray-Boyles
Jamal Shead
Garrett Temple

2 Way Players
Chucky Hepburn
AJ Lawson
Alijah Martin

Injuries/Out
Chucky Hepburn (knee) out
Immanuel Quickley (foot) out

Head Coach
Darko Rajakovic

Advertisement

Key Matchups
Sam Hauser vs Brandon Ingram

Ingram is averaging 21.4 points, 5.6 rebounds, and 3.6 assists per game while shooting 47.2% from the field and 37.7% from beyond the arc. In the 2 games against the Celtics this season, he averaged 27 points, 4 rebounds and 5 assists while shooting 56.8% from the field and 50% from beyond the arc. The Celtics need to do a better job of defending him in this game.

Jayson Tatum vs Scottie Barnes
Barnes is averaging 18.2 points, 7.5 rebounds, 5.9 assists, 1.5 steals and 1.5 blocks per game while shooting 50.4% from the field and 29.6% from beyond the arc. In the 2 games against the Celtics this season, he averaged 15 points, 10 rebounds, 7 assists, and 1.5 blocks per game while shooting 40.7% from the field and 16.7% from beyond the arc. Although he has been struggling to hit 3’s, he is capable of hitting them if left open.

Honorable Mention
Jaylen Brown vs RJ Barrett
Barrett is averaging 19.2 points, 5.2 rebounds, and 3.4 assists per game while shooting 49.5% from the field and 34.6% from beyond the arc. He played in just 1 game against the Celtics this season and finished with 19 points, 4 rebounds, and 7 assists while shooting 40% from the field and 60% from beyond the arc. The Celtics have to defend him better in this game.

Keys to the Game
Defense – Defense is the most important key to winning. The Celtics are 4th in the league with a defensive rating of 111.8. The Raptors are 7th with a defensive rating of 114.7. The Celtics must stay committed to playing tough, lock down defense, especially against a Raptors team that plays good defense themselves. The Celtics must especially defend in the paint as the Raptors put up 53 points in the paint per game (5th).

Rebound – As with defense, rebounding will always be a key to winning every game. The Celtics are 4th with 46.5 rebounds per game. The Raptors are 23rd with 42.2 rebounds per game. The Celtics will need to rebound as a team with players crashing the boards from every position. The Celtics can’t score without the ball and rebounding is a great way to get the ball and to get extra possessions and to also deny the Raptors extra possessions and 2nd chance points.

Advertisement

Move the Ball Carefully – The Celtics are at their best when the ball moves and they make the extra pass. When the ball sticks and players try to do too much, the Celtics struggle. They are 34-2 this season when they have 25 or more assists and they are 18-0 when they have 29 or more assists. The Raptors are 2nd with 29.5 assists per game. But, the Celtics have to make careful passes and not get sloppy because the Raptors are 5th in the league, averaging 20 points off turnovers and 18.9 fast break points per game (1st).

Play with Energy and Focus for 48 Minutes – The Celtics must play with effort and energy and they have to play harder than the Raptors for all 4 quarters. The team that plays the hardest and that is more aggressive will usually get a better whistle. They also must stay focused on taking good shots and making them. If the 3’s are falling, they are tough to beat. But, if the 3’s aren’t falling, it can get ugly and so the Celtics need to focus on taking the best shots, whether that means shooting more 3’s or taking the ball into the paint if they aren’t falling.

Home Game – The Celtics are once again home and they should get a boost from the home crowd and they have the benefit of not having to travel. The Raptors are playing in the 2nd straight game on the road and may be a little road weary. They also have the distractions of travel, staying in hotels, and playing in front of a hostile crowd.

Officiating – The officiating can always be an x-factor. Every crew calls the game differently. Some call it tight with a lot of fouls while others let them play and let a lot of contact go. The Celtics have to adapt to how the game is being called and not allow bad calls and no calls to take away their focus on playing the game. If they play well enough, the refs won’t make a difference.



Source link

Advertisement
Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Boston, MA

Biddeford woman runs Boston Marathon in honor of late mother

Published

on

Biddeford woman runs Boston Marathon in honor of late mother


Jessica Johnson of Biddeford will run her fourth Boston Marathon next week. (Courtesy of Jessica Johnson)

Running the storied Boston Marathon is probably every runner’s dream. But for Jessica Johnson, a Biddeford resident and Massabesic Middle School teacher, it wasn’t an overwhelming desire that prompted her. It was boredom.

“I was bored during COVID,” she said. “I was just bored, so I laced up my sneakers, and off I went.” 

The other reason, and one of her biggest motivators for running marathons, is her mother, who died of brain cancer in 2002.

Advertisement

All of Johnson’s races have been in her honor.

This year, Johnson is running in partnership with Dana Farber Cancer Institute raising money for cancer research. 

“My mom would’ve been my biggest cheerleader,” she said. “I always think of my mom.” 

Johnson’s mom often shows up in mysterious ways on marathon courses. Two years ago, Johnson got very sick on the Boston Marathon course. 

“I don’t know what happened,” she said. “I probably shouldn’t have kept going, but I did.” 

Advertisement

At Mile 15, Johnson stopped at a bus that was there to pick up runners who needed to step away from the course. 

She asked her mom for a sign to keep going. 

“Her favorite song came on the bus radio,” Johnson said. “I finished the race for her.” 

Johnson started running at the end of 2021, and by 2022, she qualified for her first half marathon. Since then, she has completed marathons across the country, including three Boston Marathons.

Johnson’s young daughters meet her at the finish line each year. (Courtesy of Jessica Johnson)

Next week, on April 20, she will run the Boston Marathon for the fourth time on its 130th anniversary, alongside 30,000 fellow runners. 

Advertisement

Founded in 1897, the Boston Marathon is one of the pinnacles of racing for marathon runners. It was one of the first to allow women to compete, and the first to feature a wheelchair division. 

Each year, over 500,000 spectators line up along the course to cheer on runners — from Hopkinton, to Natick, to Newton and finally, the finish line in Boston’s Copley Square, where Johnson’s daughters will be waiting for her. 

Johnson’s daughters have motivated her to finish the race every time, she said. 

“I’m always looking to set an example of what hard work does,” Johnson said. “But it’s also about body positivity. I work really hard to get out there, and that’s what I want to show them.” 

Each year, Johnson runs the marathon in honor of her mother, who passed away from brain cancer. (Courtesy of Jessica Johnson)

Johnson also runs to honor others who have lost their lives to cancer. Year after year, she asks her community who they would like to honor, and writes their names on her arms. 

Advertisement

“Why not find a way to honor other people’s memories too?” she said. 

While each of her marathons has been powerful and uplifting, next week’s race will be her last. 

She hopes to run a different marathon each spring, something she can’t do while running in Boston. 

“I want a personal record on this one. That will give me closure,” she said. “I’m going to go out with a bang.” 

Johnson is still fundraising for the race, and donations can be made through her Venmo, @RunForResearch. All proceeds will benefit Dana Farber Cancer Institute.

Advertisement



Source link

Continue Reading

Boston, MA

Man seriously hurt in Dorchester crash – Boston News, Weather, Sports | WHDH 7News

Published

on

Man seriously hurt in Dorchester crash – Boston News, Weather, Sports | WHDH 7News


DORCHESTER, MASS. (WHDH) – A man was rushed to the hospital after a crash between a car and a scooter in Dorchester, according to Boston police.

Police responded to Aspinwall Road at approximately 8:51 p.m. for a report of a motor vehicle accident. Officers said they found one victim hurt on scene. He was taken to the hospital with life-threatening injuries. 

People who live in the area said the intersection sees a lot of scooter traffic in the warmer months of the year.

“It’s a little bit dangerous, especially when it gets warm because people are riding mopeds and riding bikes and stuff, and they do tricks,” said one woman who lives in the area. “It’s just a big intersection where cars are coming from every different way and you never know what’s going to happen.”

Advertisement

The crash is under investigation.

This is a developing news story; stay with 7NEWS on-air and online for the latest details.

(Copyright (c) 2026 Sunbeam Television. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox



Source link

Advertisement
Continue Reading

Boston, MA

One Boston Day 2026: How to volunteer, take part across Boston

Published

on

One Boston Day 2026: How to volunteer, take part across Boston


One Boston Day 2026: How to volunteer, take part across Boston

Advertisement

HE’S NOW BEING CHARGED WITH ARMED ROBBERY. WE’RE COMING UP ON 637 AND WE ARE ALMOST THERE. A WEEK FROM TODAY, THOUSANDS OF RUNNERS WILL TURN ONTO BOYLSTON STREET AND CROSS THE FINISH LINE OF THE BOSTON MARATHON AND BOSTON AND THE BAY ARE KICKING OFF A WHOLE WEEK OF EVENTS BEFORE THE BIG DAY. STARTING WEDNESDAY, THE LINES ARE PAINTED PENDING GOOD WEATHER. THE WORK ON THE STARTING LINE BEGINS THAT DAY IN HOPKINTON. WORK ON THE FINISH LINE IN BACK BAY SHOULD BEGIN ON THURSDAY. SO EXCITING. ON WEDNESDAY IT WILL MARK ONE BOSTON DAY. OF COURSE, THAT’S THE DAY WE HONOR HOW THE CITY CAME TOGETHER IN THE DAYS FOLLOWING THE BOSTON MARATHON BOMBING. YOU ARE ASKED TO SHARE ACTS OF KINDNESS ALL DAY LONG. FINALLY, EVERYTHING MARATHON RELATED COMES TOGETHER ON FRIDAY WITH THE BOSTON MARATHON FAN EXPO. LIKE PREVIOUS YEARS, THAT WILL BE AT THE HYNES CONVENTION CENTER. FOR INFORMATION ON ALL THE EVENTS THIS WEEK, YOU CAN KEEP AN EYE ON WCVB.COM AND OUR MOBILE APP. THAT IS A THRILLING MOMENT WHEN YOU GO TO PICK UP YOUR NUMBER. IT WON’T BE LONG NOW. THE 130TH BOSTON MARATHON ON MONDAY, APRIL 20TH, WCVB.

Advertisement

One Boston Day 2026: How to volunteer, take part across Boston

Updated: 2:17 PM EDT Apr 13, 2026

Editorial Standards

Advertisement

Residents and visitors are encouraged to share acts of kindness marking One Boston Day on Wednesday, honoring how the city came together in the days after the Boston Marathon bombing, 13 years ago. The day will also include the annual memorials along Boylston Street. “I hope everyone will join their neighbors today in honoring those we lost and celebrating the love that makes Boston a home for everyone,” Mayor Michelle Wu wrote in a statement. “As spring arrives in Boston each year, we are reminded of the hope and spirit of our city,” said Bill Richard, who created a foundation in honor of his son, Martin, who was killed in the bombing.How to get involvedThe city of Boston and partner organizations are offering several ways for people to participate in One Boston Day and related events, according to the city:Volunteer projects citywide: City departments will host service opportunities on April 15 and in the days leading up to Marathon Monday.Neighborhood cleanup: A youth and family cleanup is scheduled for Saturday, April 18, at 9 a.m. at Franklin Park Playstead, organized by the Mayor’s Office of Civic Organizing. Volunteers are asked to register ahead of time. Free ‘Stop the Bleed’ training: Virtual sessions will be held April 15 at noon and 6 p.m. to teach lifesaving bleeding control techniques, offered by the Stepping Strong Center at Brigham and Women’s Hospital. Acts of kindness: Residents are encouraged to perform individual acts of kindness in their neighborhoods throughout the day and week.

Residents and visitors are encouraged to share acts of kindness marking One Boston Day on Wednesday, honoring how the city came together in the days after the Boston Marathon bombing, 13 years ago.

Advertisement

The day will also include the annual memorials along Boylston Street.

“I hope everyone will join their neighbors today in honoring those we lost and celebrating the love that makes Boston a home for everyone,” Mayor Michelle Wu wrote in a statement.

“As spring arrives in Boston each year, we are reminded of the hope and spirit of our city,” said Bill Richard, who created a foundation in honor of his son, Martin, who was killed in the bombing.

Advertisement

How to get involved

The city of Boston and partner organizations are offering several ways for people to participate in One Boston Day and related events, according to the city:

  • Volunteer projects citywide: City departments will host service opportunities on April 15 and in the days leading up to Marathon Monday.
  • Neighborhood cleanup: A youth and family cleanup is scheduled for Saturday, April 18, at 9 a.m. at Franklin Park Playstead, organized by the Mayor’s Office of Civic Organizing. Volunteers are asked to register ahead of time.
  • Free ‘Stop the Bleed’ training: Virtual sessions will be held April 15 at noon and 6 p.m. to teach lifesaving bleeding control techniques, offered by the Stepping Strong Center at Brigham and Women’s Hospital.
  • Acts of kindness: Residents are encouraged to perform individual acts of kindness in their neighborhoods throughout the day and week.

`;
}

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’);
});

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’);
});

Advertisement

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 };

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;

Advertisement

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’);

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.wcvb.com/alerts”);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘mobile-weather’, “https://www.wcvb.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 || ”;

Advertisement

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);
}

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);
}

Advertisement

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;

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

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’);
});

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

Advertisement

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 };

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) {}

Advertisement

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’);

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.wcvb.com/alerts”);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘sidelist-weather’, “https://www.wcvb.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);
}
}
}
}

Advertisement

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);
}

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

Advertisement

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;

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

Advertisement

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

Continue Reading

Trending