Add a submit button after the search input in a Search facet

<?php

add_action( 'wp_head', function() {
?>
<script>(function($) {
  $(document).on('facetwp-loaded', function() {
    $('.facetwp-input-wrap').each(function() {
        if ($(this).find('.facetwp-search-submit').length < 1) {
            $(this).find('.facetwp-search').after('<button class="facetwp-search-submit" onclick="FWP.refresh()">Submit</button>');
        }
    });
  });
})(jQuery);
</script>
<?php
}, 100 );