fixed bug, disabled fieldswere causing javascript errors
This commit is contained in:
parent
5f2198dc5f
commit
54bf963942
@ -43,14 +43,17 @@ function generatePassword() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dopost(form) {
|
function dopost(form) {
|
||||||
localStorage.name = form.name.value.replace(/ ##.+$/, '');
|
if(form.elements['name']) {
|
||||||
if(form.email.value != 'sage')
|
localStorage.name = form.elements['name'].value.replace(/ ##.+$/, '');
|
||||||
localStorage.email = form.email.value;
|
}
|
||||||
|
if(form.elements['email'] && form.elements['email'].value != 'sage') {
|
||||||
|
localStorage.email = form.elements['email'].value;
|
||||||
|
}
|
||||||
|
|
||||||
saved[document.location] = form.body.value;
|
saved[document.location] = form.elements['body'].value;
|
||||||
sessionStorage.body = JSON.stringify(saved);
|
sessionStorage.body = JSON.stringify(saved);
|
||||||
|
|
||||||
return form.body.value != "" || form.file.value != "";
|
return form.elements['body'].value != "" || form.elements['file'].value != "";
|
||||||
}
|
}
|
||||||
function citeReply(id) {
|
function citeReply(id) {
|
||||||
body = document.getElementById('body');
|
body = document.getElementById('body');
|
||||||
@ -95,14 +98,16 @@ if(localStorage.stylesheet) {
|
|||||||
|
|
||||||
function rememberStuff() {
|
function rememberStuff() {
|
||||||
if(document.forms.post) {
|
if(document.forms.post) {
|
||||||
if(!localStorage.password)
|
if(document.forms.post.password) {
|
||||||
localStorage.password = generatePassword();
|
if(!localStorage.password)
|
||||||
document.forms.post.password.value = localStorage.password;
|
localStorage.password = generatePassword();
|
||||||
|
document.forms.post.password.value = localStorage.password;
|
||||||
|
}
|
||||||
|
|
||||||
if(localStorage.name)
|
if(localStorage.name && document.forms.post.elements['name'])
|
||||||
document.forms.post.name.value = localStorage.name;
|
document.forms.post.elements['name'].value = localStorage.name;
|
||||||
if(localStorage.email)
|
if(localStorage.email && document.forms.post.elements['email'])
|
||||||
document.forms.post.email.value = localStorage.email;
|
document.forms.post.elements['email'].value = localStorage.email;
|
||||||
|
|
||||||
if (window.location.hash.indexOf('q') == 1)
|
if (window.location.hash.indexOf('q') == 1)
|
||||||
citeReply(window.location.hash.substring(2));
|
citeReply(window.location.hash.substring(2));
|
||||||
|
Loading…
Reference in New Issue
Block a user