diff --git a/src/page.html b/src/page.html index 94dd215..c613edb 100644 --- a/src/page.html +++ b/src/page.html @@ -197,18 +197,35 @@ function showAdminLoginModal(){ m.id='mb-admin-modal'; m.innerHTML=''+ '
Admin Authentication Required
'+ + '
'+ ''+ + ''+ + '
'+ ''+ '
'; document.body.appendChild(m); } document.getElementById('admin-password').value=''; + document.getElementById('admin-password').type='password'; document.getElementById('admin-error').textContent=''; m.classList.add('active'); document.getElementById('admin-password').focus(); } +function toggleAdminPassword(){ + var pwdInput=document.getElementById('admin-password'); + var toggleBtn=pwdInput.parentElement.querySelector('.mb-password-toggle'); + + if(pwdInput.type==='password'){ + pwdInput.type='text'; + toggleBtn.textContent='🙈'; + }else{ + pwdInput.type='password'; + toggleBtn.textContent='👁'; + } +} + function handleAdminKeyPress(e){ if(e.key==='Enter'||e.keyCode===13){ submitAdminLogin();