diff --git a/app/assets/javascripts/utilities/showUserAlertModal.js b/app/assets/javascripts/utilities/showUserAlertModal.js index 1e7bd30fd..ed28b9a1e 100644 --- a/app/assets/javascripts/utilities/showUserAlertModal.js +++ b/app/assets/javascripts/utilities/showUserAlertModal.js @@ -5,8 +5,8 @@ * @param {string} title The title/heading text to be displayed * @param {string} text The body text to be displayed * @param {string} confirm_text Text of the confirmation button - * - * @example + * + * @example * showUserAlertModal('Warning', 'You must wait', 'OK', '/faq/why-must-i-wait', 'Why must I wait?'); */ function showUserAlertModal(title, text, confirm_text) { @@ -14,44 +14,54 @@ function showUserAlertModal(title, text, confirm_text) { toggleUserAlertModal(); } /** - * Displays a user rate limit alert modal letting the user know what they did that exceeded a rate limit, + * Displays a user rate limit alert modal letting the user know what they did that exceeded a rate limit, * and gives them links to explain why they must wait * * @function showUserAlertModal * @param {string} action_text Description of the action taken by the user * @param {string} next_action_text Description of the next action that can be taken - * - * @example + * + * @example * showRateLimitModal('Made a comment', 'comment again'); */ function showRateLimitModal(action_text, next_action_text) { let rateLimitText = buildRateLimitText(action_text, next_action_text); - let rateLimitLink = "/faq"; - showUserAlertModal('Wait a Moment...', rateLimitText, 'Got it', rateLimitLink, "Why do I have to wait?") + let rateLimitLink = '/faq'; + showUserAlertModal( + 'Wait a Moment...', + rateLimitText, + 'Got it', + rateLimitLink, + 'Why do I have to wait?', + ); } /** * HTML ID for modal DOM node - * + * * @private - * @constant modalId * + * @constant modalId * * @type {string} */ const modalId = 'user-alert-modal'; /** * HTML template for modal - * + * * @private * @function getModalHtml - * + * * @param {string} title The title/heading text to be displayed * @param {string} text The body text to be displayed * @param {string} confirm_text Text of the confirmation button - * + * * @returns {string} HTML for the modal */ -const getModalHtml = (title, text, confirm_text) => `