(function ($) {
    'use strict';

    $(document).on('click', '[data-copy-login-url]', function (event) {
        event.preventDefault();
        var value = $('input[name="login-protect-current-url"]').val();
        if (value && navigator.clipboard) {
            navigator.clipboard.writeText(value);
        }
    });
})(jQuery);
