Archived
1
0

fix undefined error

This commit is contained in:
Jeff Becker 2016-04-30 16:11:20 -04:00
parent 1a3fe3af66
commit 0df3fe43e0
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
2 changed files with 3 additions and 2 deletions

View File

@ -221,9 +221,10 @@ DynReply.prototype.showError = function(msg) {
DynReply.prototype.showMessage = function(msg) { DynReply.prototype.showMessage = function(msg) {
this._error.setAttribute("class", "message"); this._error.setAttribute("class", "message");
this._error.value = document.createTextNode(msg); this._error.value = document.createTextNode(msg);
var e = this._error;
setTimeout(function() { setTimeout(function() {
// clear it // clear it
this._error.innerHTML = ""; e.innerHTML = "";
}, 2000); }, 2000);
} }

View File

@ -31,7 +31,7 @@ DynReply.prototype.hide=function(){this.elem.style.display='none';}
DynReply.prototype.setBoard=function(boardname){if(boardname){this.board=boardname;}} DynReply.prototype.setBoard=function(boardname){if(boardname){this.board=boardname;}}
DynReply.prototype.setRoot=function(roothash){if(roothash){this.roothash=roothash;}} DynReply.prototype.setRoot=function(roothash){if(roothash){this.roothash=roothash;}}
DynReply.prototype.showError=function(msg){console.log("error in dynreply: "+msg);this._error.setAttribute("class","error");this._error.value=document.createTextNode(msg);} DynReply.prototype.showError=function(msg){console.log("error in dynreply: "+msg);this._error.setAttribute("class","error");this._error.value=document.createTextNode(msg);}
DynReply.prototype.showMessage=function(msg){this._error.setAttribute("class","message");this._error.value=document.createTextNode(msg);setTimeout(function(){this._error.innerHTML="";},2000);} DynReply.prototype.showMessage=function(msg){this._error.setAttribute("class","message");this._error.value=document.createTextNode(msg);var e=this._error;setTimeout(function(){e.innerHTML="";},2000);}
function nntpchan_reply(parent,shorthash){if(parent){var boardname=parent.getAttribute("boardname");var roothash=parent.getAttribute("root");var replyto=getReplyTo();replyto.setBoard(boardname);replyto.setRoot(roothash);replyto.show();} function nntpchan_reply(parent,shorthash){if(parent){var boardname=parent.getAttribute("boardname");var roothash=parent.getAttribute("root");var replyto=getReplyTo();replyto.setBoard(boardname);replyto.setRoot(roothash);replyto.show();}
var elem=document.getElementById("postform_message");if(elem) var elem=document.getElementById("postform_message");if(elem)
{elem.value+=">>"+shorthash.substr(0,10)+"\n";}} {elem.value+=">>"+shorthash.substr(0,10)+"\n";}}