facetwp updated facetwp-template visible

<?php
/** update check for facets in url for use with direct links with vars in url
 ** https://facetwp.com/how-to-hide-the-template-until-facets-are-selected/
 **/
add_action( 'wp_head', function() { ?>
    <script>
        (function($) {
            $(document).on('facetwp-loaded', function() {
                if (FWP.loaded ||  '' != FWP.buildQueryString()) {
                    $('.facetwp-template').addClass('visible');
                }
            });
        })(jQuery);
    </script>
<?php }, 10, 2 );