changepassword.js 463 B

1234567891011121314151617
  1. function onNameChange() {
  2. if ( wgUserName != document.getElementById('wpName').value ) {
  3. document.getElementById('wpPassword').disabled = true;
  4. document.getElementById('wpComment').disabled = false;
  5. } else {
  6. document.getElementById('wpPassword').disabled = false;
  7. document.getElementById('wpComment').disabled = true;
  8. }
  9. }
  10. function onNameChangeHook() {
  11. document.getElementById( 'wpName' ).onblur = onNameChange;
  12. }
  13. addOnloadHook( onNameChangeHook );