From b83b75338cfd707c20d9b5d4eeefc71b41a14fe9 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 19 Apr 2017 07:27:40 -0400 Subject: [PATCH] add quick reply (initial) --- contrib/static/overchan.js | 11 +++++++++++ contrib/templates/placebo/board.mustache | 2 ++ contrib/templates/placebo/post.mustache | 4 ++-- contrib/templates/placebo/postform.mustache | 2 +- contrib/templates/placebo/thread.mustache | 1 + 5 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 contrib/static/overchan.js diff --git a/contrib/static/overchan.js b/contrib/static/overchan.js new file mode 100644 index 0000000..377fc6b --- /dev/null +++ b/contrib/static/overchan.js @@ -0,0 +1,11 @@ + +function quickreply(shorthash, longhash, url) { + if (!window.location.pathname.startsWith("/t/")) + { + window.location.href = url; + return; + } + var elem = document.getElementById("comment"); + if(!elem) return; + elem.value += ">>" + shorthash + "\n"; +} diff --git a/contrib/templates/placebo/board.mustache b/contrib/templates/placebo/board.mustache index aa4d91f..b896b1a 100644 --- a/contrib/templates/placebo/board.mustache +++ b/contrib/templates/placebo/board.mustache @@ -18,6 +18,8 @@ {{board.Board}} + {{{board.Navbar}}} diff --git a/contrib/templates/placebo/post.mustache b/contrib/templates/placebo/post.mustache index b19a139..341caf8 100644 --- a/contrib/templates/placebo/post.mustache +++ b/contrib/templates/placebo/post.mustache @@ -27,8 +27,8 @@ {{#post.Attachments}} {{/post.Attachments}} - {{post.subject}} {{post.Name}} {{post.Date}} - {{post.ShortHash}} + {{post.subject}} {{post.Name}} {{post.Date}} + {{post.ShortHash}}

{{{post.RenderBody}}} diff --git a/contrib/templates/placebo/postform.mustache b/contrib/templates/placebo/postform.mustache index 795821c..2aa17bd 100644 --- a/contrib/templates/placebo/postform.mustache +++ b/contrib/templates/placebo/postform.mustache @@ -22,7 +22,7 @@ Comment - + {{#files}} diff --git a/contrib/templates/placebo/thread.mustache b/contrib/templates/placebo/thread.mustache index 09c85c6..cbf610c 100644 --- a/contrib/templates/placebo/thread.mustache +++ b/contrib/templates/placebo/thread.mustache @@ -17,6 +17,7 @@ {{board.Board}} + {{{thread.Navbar}}}