From abefe50eb69143480ddf3b19cd596461aa5c67a3 Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 4 Sep 2015 17:09:43 -0400 Subject: [PATCH] make post numbers insert backlink on click --- contrib/static/nntpchan.js | 11 +++++++++++ contrib/templates/default/board.mustache | 1 + contrib/templates/default/post.mustache | 2 +- contrib/templates/default/postform.mustache | 2 +- contrib/templates/default/thread.mustache | 1 + 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 contrib/static/nntpchan.js diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js new file mode 100644 index 0000000..d314479 --- /dev/null +++ b/contrib/static/nntpchan.js @@ -0,0 +1,11 @@ +// +// nntpchan.js -- frontend ui niceness +// + + +// insert a backlink for a post given its short hash +function nntpchan_backlink(shorthash) { + var elem = document.getElementById("postform_message"); + elem.value += ">>" + shorthash + "\n"; + +} diff --git a/contrib/templates/default/board.mustache b/contrib/templates/default/board.mustache index 0d071fe..dbbad9f 100644 --- a/contrib/templates/default/board.mustache +++ b/contrib/templates/default/board.mustache @@ -15,6 +15,7 @@ + {{board.Board}} diff --git a/contrib/templates/default/post.mustache b/contrib/templates/default/post.mustache index f220daa..f3cca99 100644 --- a/contrib/templates/default/post.mustache +++ b/contrib/templates/default/post.mustache @@ -21,7 +21,7 @@ {{Date}} - No. {{ShortHash}} + No. {{ShortHash}} {{#OP}} [reply] {{/OP}} diff --git a/contrib/templates/default/postform.mustache b/contrib/templates/default/postform.mustache index 7d5b122..63809bd 100644 --- a/contrib/templates/default/postform.mustache +++ b/contrib/templates/default/postform.mustache @@ -34,7 +34,7 @@ Comment - + diff --git a/contrib/templates/default/thread.mustache b/contrib/templates/default/thread.mustache index 41fbc24..4ab4077 100644 --- a/contrib/templates/default/thread.mustache +++ b/contrib/templates/default/thread.mustache @@ -15,6 +15,7 @@ + {{thread.OP.Subject}}