Archived
1
0

don't show reply box if not created

This commit is contained in:
Jeff 2016-05-04 13:14:57 -04:00
parent 96f6044489
commit fb2b80335e
2 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,7 @@ DynReply.prototype.showMessage = function(msg) {
// reply box function // reply box function
function nntpchan_reply(parent, shorthash) { function nntpchan_reply(parent, shorthash) {
if (parent) { if (parent && document.dynreply) {
var boardname = parent.getAttribute("boardname"); var boardname = parent.getAttribute("boardname");
var roothash = parent.getAttribute("root"); var roothash = parent.getAttribute("root");
var replyto = getReplyTo(); var replyto = getReplyTo();

View File

@ -678,7 +678,7 @@ DynReply.prototype.setBoard=function(boardname){if(boardname){this.board=boardna
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 message");this._error.appendChild(document.createTextNode(msg));this.updateCaptcha();} DynReply.prototype.showError=function(msg){console.log("error in dynreply: "+msg);this._error.setAttribute("class","error message");this._error.appendChild(document.createTextNode(msg));this.updateCaptcha();}
DynReply.prototype.showMessage=function(msg){this._error.setAttribute("class","message");this._error.innerHTML="";this._error.appendChild(document.createTextNode(msg));var e=this._error;setTimeout(function(){e.innerHTML="";},2000);} DynReply.prototype.showMessage=function(msg){this._error.setAttribute("class","message");this._error.innerHTML="";this._error.appendChild(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&&document.dynreply){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";}}
function inject_hover(prefix,el,parent){if(!prefix){throw"prefix is not defined";} function inject_hover(prefix,el,parent){if(!prefix){throw"prefix is not defined";}