Archived
1
0

try fixing dynamic reply

This commit is contained in:
Jeff Becker 2016-04-30 12:35:21 -04:00
parent a51f9a77e6
commit 926aa0b69f
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
2 changed files with 4 additions and 5 deletions

View File

@ -174,10 +174,9 @@ DynReply.prototype.setRoot = function(roothash) {
// reply box function // reply box function
function nntpchan_reply(prefix, parent, shorthash) { function nntpchan_reply(prefix, parent, shorthash) {
console.log(parent.roothash, parent.boardname); if (prefix && parent) {
if (prefix && parent && parent.roothash && parent.boardname) { var boardname = parent.getAttribute("boardname");
var boardname = parent.boardname; var roothash = parent.getAttribute("roothash");
var roothash = parent.roothash;
var replyto = getReplyTo(); var replyto = getReplyTo();
// set target // set target
replyto.setBoard(boardname); replyto.setBoard(boardname);

View File

@ -25,7 +25,7 @@ DynReply.prototype.setPrefix=function(prefix){this.prefix=prefix;}
DynReply.prototype.hide=function(){this.elem.style.display='none';} 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;}}
function nntpchan_reply(prefix,parent,shorthash){console.log(parent.roothash,parent.boardname);if(prefix&&parent&&parent.roothash&&parent.boardname){var boardname=parent.boardname;var roothash=parent.roothash;var replyto=getReplyTo();replyto.setBoard(boardname);replyto.setRoot(roothash);replyto.setPrefix(prefix);replyto.show();} function nntpchan_reply(prefix,parent,shorthash){if(prefix&&parent){var boardname=parent.getAttribute("boardname");var roothash=parent.getAttribute("roothash");var replyto=getReplyTo();replyto.setBoard(boardname);replyto.setRoot(roothash);replyto.setPrefix(prefix);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";}