make post numbers insert backlink on click
This commit is contained in:
parent
fb06097557
commit
abefe50eb6
11
contrib/static/nntpchan.js
Normal file
11
contrib/static/nntpchan.js
Normal file
@ -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";
|
||||||
|
|
||||||
|
}
|
@ -15,6 +15,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="stylesheet" href="{{board.Prefix}}static/site.css"></link>
|
<link rel="stylesheet" href="{{board.Prefix}}static/site.css"></link>
|
||||||
|
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
|
||||||
<title>{{board.Board}}</title>
|
<title>{{board.Board}}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{{Date}}
|
{{Date}}
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<a href="{{PostURL}}" onclick="">No. {{ShortHash}}</a>
|
<a href="{{PostURL}}" onclick="nntpchan_backlink('{{ShortHash}}');">No. {{ShortHash}}</a>
|
||||||
{{#OP}}
|
{{#OP}}
|
||||||
<a href="{{PostURL}}">[reply]</a>
|
<a href="{{PostURL}}">[reply]</a>
|
||||||
{{/OP}}
|
{{/OP}}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
Comment
|
Comment
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<textarea type="text" name="message" cols=40 rows=5></textarea>
|
<textarea id="postform_message" type="text" name="message" cols=40 rows=5></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="stylesheet" href="{{thread.Prefix}}static/site.css"></link>
|
<link rel="stylesheet" href="{{thread.Prefix}}static/site.css"></link>
|
||||||
|
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
|
||||||
<title> {{thread.OP.Subject}} </title>
|
<title> {{thread.OP.Subject}} </title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
Reference in New Issue
Block a user