From 85dc5da83ac4202440db17559872a0630eda6a2c Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 30 Apr 2016 12:29:51 -0400 Subject: [PATCH] add logging --- contrib/js/backlink.js | 1 + contrib/static/nntpchan.js | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/js/backlink.js b/contrib/js/backlink.js index 20e4063..eaccf3b 100644 --- a/contrib/js/backlink.js +++ b/contrib/js/backlink.js @@ -139,6 +139,7 @@ DynReply.prototype.update = function() { } DynReply.prototype.show = function() { + console.log("show dynreply"); this.update(); this.elem.style.display = 'inline'; } diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index ce459cc..9b0a601 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -19,7 +19,7 @@ var elem=document.createElement("div");elem.setAttribute("id","postform-containe elem=document.createElement("input");elem.setAttribute("name","subject");elem.setAttribute("value","");var submit=document.createElement("input");submit.setAttribute("type","submit");submit.setAttribute("value","reply");submit.setAttribute("class","button");table_insert_row(tbody,document.createTextNode("Subject"),[elem,submit]);elem=document.createElement("textarea");elem.setAttribute("id","postform_message");elem.setAttribute("name","message");elem.setAttribute("cols","40");elem.setAttribute("rows","5");table_insert_row(tbody,document.createTextNode("Comment"),[elem]);elem=document.createElement("input");elem.setAttribute("class","postform_attachment");elem.setAttribute("id","postform_attachments");elem.setAttribute("type","file");elem.setAttribute("name","attachment_uploaded");elem.setAttribute("multiple","multiple");table_insert_row(tbody,document.createTextNode("Files"),[elem]);elem=document.createElement("input");elem.setAttribute("type","checkbox");elem.setAttribute("name","dubs");table_insert_row(tbody,document.createTextNode("Get Dubs"),[elem]);elem=document.createElement("img");elem.setAttribute("id","captcha_img");elem.alt="captcha";table_insert_row(tbody,document.createTextNode("Captcha"),[elem]);elem=document.createElement("input");elem.name="captcha";elem.autocomplete="off";table_insert_row(tbody,document.createTextNode("Name"),[elem]) table.appendChild(tbody);this.form.appendChild(table);this.elem.appendChild(this.form);parent.appendChild(this.elem);this.board=null;this.roothash=null;this.prefix=null;} DynReply.prototype.update=function(){if(this.prefix){this.updateCaptcha();if(this.board&&this.roothash){var ref=document.getElementById("postform_reference");ref.value=this.roothash;this.form.action=this.prefix+"post/"+this.board;}}} -DynReply.prototype.show=function(){this.update();this.elem.style.display='inline';} +DynReply.prototype.show=function(){console.log("show dynreply");this.update();this.elem.style.display='inline';} DynReply.prototype.updateCaptcha=function(){if(this.prefix){var captcha_img=document.getElementById("captcha_img");captcha_img.src=this.prefix+"captcha/img";}} DynReply.prototype.setPrefix=function(prefix){this.prefix=prefix;} DynReply.prototype.hide=function(){this.elem.style.display='none';} @@ -39,8 +39,6 @@ for(var elem in ls){inject_hover(prefix,ls[elem]);}} function init(prefix){inject_hover_for_element(document);} /* ./contrib/js/banner.js */ var banner_count=3;function nntpchan_inject_banners(elem,prefix){var n=Math.floor(Math.random()*banner_count);var banner=prefix+"static/banner_"+n+".jpg";var e=document.createElement("img");e.src=banner;e.id="nntpchan_banner";elem.appendChild(e);} -/* ./contrib/js/dynamic-reply.js */ - /* ./contrib/js/expand-image.js */ function filenameIsImage(fname){return/\.(gif|jpeg|jpg|png|webp)/.test(fname);} function setupInlineImage(thumb,url){if(thumb.inlineIsSetUp)return;thumb.inlineIsSetUp=true;var img=thumb.querySelector("img.thumbnail");var expanded=false;var oldurl=img.src;thumb.onclick=function(){if(expanded){img.setAttribute("class","thumbnail");img.src=oldurl;expanded=false;}else{img.setAttribute("class","expanded-thumbnail");img.src=url;expanded=true;}