From bfd16332f1440944b75da819a60925e9259df373 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 16 Jan 2017 11:38:50 -0500 Subject: [PATCH] more --- contrib/js/nntpchan/reply.js | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/contrib/js/nntpchan/reply.js b/contrib/js/nntpchan/reply.js index d8de1f6..6209610 100644 --- a/contrib/js/nntpchan/reply.js +++ b/contrib/js/nntpchan/reply.js @@ -1,19 +1,12 @@ function getReplyTo() { - if(!document.dynreply) { - var e = document.getElementById("postform_container"); - if (e) { - // use existing postform - document.dynreply = new DynReply(e); - } else { - // build a new postform - document.dynreply = new DynReply(); + if(!document.dynreply) { + document.dynreply = new DynReply(); } - e = document.dynreply.elem; + var e = document.dynreply.elem; e.style.position = "fixed"; e.setAttribute("class", "shadow"); - } - return document.dynreply; + return document.dynreply; } function table_insert_row(table, header, items) { @@ -34,20 +27,7 @@ function table_insert_row(table, header, items) { /** build dynamic reply box */ -function DynReply(existingElem) { - if (existingElem) { - // wrap existing post form - // XXX: wrap it here - this.elem = existingElem; - this.form = this.elem.querySelector("form"); - this._error = document.getElementById("postform_msg"); - this.url = this.form.action + "?t=json"; - this.x = 1; - this.y = 1; - return; - } - - // build new post form +function DynReply() { var elem = document.createElement("div"); elem.setAttribute("id", "postform_container"); @@ -142,7 +122,6 @@ function DynReply(existingElem) { this.url = null; this.x = 1; this.y = 1; - } DynReply.prototype.update = function() {