1(function(){ 2 const _selectButtonSubmit = () => { 3 const buttonSubmit = document.querySelector( 4 '.lfr-ddm-form-pagination-controls > button' 5 ); 6 7 return buttonSubmit; 8 }; 9 10 const _changeButtonNameToRegister = () => { 11 const buttonSubmit = _selectButtonSubmit(); 12 13 buttonSubmit.innerHTML = 'Register'; 14 }; 15 16 const _changeButtonStyleToSolid = () => { 17 const buttonSubmit = _selectButtonSubmit(); 18 19 buttonSubmit.classList.remove('btn-primary'); 20 buttonSubmit.classList.add('btn-solid-primary-color'); 21 }; 22 23 const _centerButtonSubmit = () => { 24 const divButtonSubmit = document.querySelector( 25 '.lfr-ddm-form-pagination-controls' 26 ); 27 28 divButtonSubmit.classList.add('align-center'); 29 }; 30 31 const handlerLiferayForm = () => { 32 const formTitle = document.querySelector('.ddm-form-name') 33 ? document.querySelector('.ddm-form-name').innerHTML 34 : null; 35 36 // Savings Pledges Form 37 38 if (formTitle === 'Savings Pledges Form') { 39 _changeButtonNameToRegister(); 40 } 41 42 // Member Benefits Form 43 44 if (formTitle === 'Member Benefits') { 45 _changeButtonStyleToSolid(); 46 _centerButtonSubmit(); 47 } 48 }; 49 50 if(!window.__liferayFormListener){ 51 window.__liferayFormListener = true; 52 window.addEventListener('load', handlerLiferayForm); 53 } 54})();
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.