1(function ($) { 2 'use strict'; 3 4 $.fn.handleMemberSignupModal = (success, message, forMembersNode) => { 5 const form = document.querySelector('#user-register-form') 6 const feedbackArea = document.querySelector('#edit-feedback') 7 8 if (feedbackArea) { 9 const successDiv = feedbackArea.querySelector('.alert--success') 10 const errorDiv = feedbackArea.querySelector('.alert--error') 11 12 if (success) { 13 // Clear errors. 14 errorDiv.style.cssText = 'display: none' 15 errorDiv.innerHTML = '' 16 17 // Show a success message. 18 successDiv.style.cssText = null 19 successDiv.innerHTML = message 20 21 let nextUrl = document.querySelector('#member-register-login-next-url')?.innerText 22 23 if (!nextUrl || nextUrl === '') { 24 nextUrl = window.location.pathname === '/user/register' && forMembersNode 25 ? `/node/${forMembersNode}` 26 : '/' 27 } 28 29 const wait = setTimeout(() => { 30 window.location = nextUrl 31 ? nextUrl 32 : window.location 33 }, 1750) 34 } 35 36 else { 37 // Failed. Clear success message. 38 successDiv.style.cssText = 'display: none' 39 successDiv.innerHTML = '' 40 41 // Show a failure message. 42 errorDiv.style.cssText = null 43 errorDiv.innerHTML = message 44 45 // Set aria-busy to false now that processing is done. 46 form.setAttribute('aria-busy', false) 47 } 48 } 49 }; 50})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.