diff options
Diffstat (limited to 'skins/common/changepassword.js')
-rw-r--r-- | skins/common/changepassword.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/skins/common/changepassword.js b/skins/common/changepassword.js new file mode 100644 index 00000000..1e3e2069 --- /dev/null +++ b/skins/common/changepassword.js @@ -0,0 +1,16 @@ + +function onNameChange() { + if ( wgUserName != document.getElementById('wpName').value ) { + document.getElementById('wpPassword').disabled = true; + document.getElementById('wpComment').disabled = false; + } else { + document.getElementById('wpPassword').disabled = false; + document.getElementById('wpComment').disabled = true; + } +} + +function onNameChangeHook() { + document.getElementById( 'wpName' ).onblur = onNameChange; +} + +addOnloadHook( onNameChangeHook ); |