do something when lightbox is just about to be visible javascript

                  jQuery(document).ready(function($) {

    const lightboxSelector = '.oxy-lightbox';

    $(lightboxSelector).on('extras_lightbox:visible', function() {

        // do something

    });

});