Override JavaScript that adds 'scrolling' class to sticky header


I need to find the JavaScript that adds the ‘scrolling’ class to the header when it’s set to Sticky and the On Scroll option is also checked.

I intend to override it in a way that the ‘scrolling’ class is added only when the sticky header reaches the top of the viewport, since I’m working with a layout where the header doesn’t start at the top of the viewport, but has a section inserted above it using the bricks_before_header hook.

Any help would be appreciated.