Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/templates/placebo/post.mustache

72 lines
2.9 KiB
Plaintext
Raw Normal View History

2017-04-19 04:42:46 +05:00
<div id="{{post.PostHash}}"
2017-04-19 17:17:05 +05:00
{{#post.OP}}
2017-04-19 20:05:32 +05:00
class="messageroot post"
2017-04-19 17:17:05 +05:00
{{/post.OP}}
{{^post.OP}}
2017-04-19 20:05:32 +05:00
class="message post"
2017-04-19 17:17:05 +05:00
{{/post.OP}}
2017-07-04 03:04:02 +05:00
data-name="{{post.Name}}"
2017-04-19 04:42:46 +05:00
data-frontend="{{post.Frontend}}"
data-newsgroup="{{post.Board}}"
data-msgid="{{post.MessageID}}"
data-msgidhash="{{post.PostHash}}"
data-rootmsgid="{{post.Reference}}"
data-rootmsgidhash="{{post.ReferenceHash}}"
2017-07-31 03:20:14 +05:00
data-pubkey="{{post.PubkeyHex}}"
2017-04-19 04:42:46 +05:00
{{#post.Sage}}
data-sage="1"
{{/post.Sage}}
{{#post.IsI2P}}
data-origin="i2p"
{{/post.IsI2P}}
{{#post.IsTor}}
data-origin="tor"
{{/post.IsTor}}
{{#post.IsClearnet}}
data-origin="clearnet"
{{/post.IsClearnet}}
2018-03-10 02:19:08 +05:00
data-frontendpubkey="{{post.FrontendPubkey}}"
2017-04-19 04:42:46 +05:00
data-posturl="{{post.PostURL}}">
{{#post.Attachments}}
<a href="{{Source}}" class="image_link" target="_blank" title="{{Filename}}"><img src="{{Thumbnail}}" class="image" /></a>
{{/post.Attachments}}
2019-02-11 00:35:14 +05:00
<span class="mod" onclick="nntpchan_mod_delete('{{post.PostHash}}');">[Delete]</span>
<span class="mod" onclick="nntpchan_mod_mark_spam('{{post.PostHash}}');">[Spam]</span>
2019-02-11 00:11:04 +05:00
{{#post.IsCtl}}
2019-02-11 00:35:14 +05:00
<span class="mod" onclick="nntpchan_mod_trust_mod('{{post.PubkeyHex}}', this);">[Trust Moderator]</span>
<span class="mod" onclick="nntpchan_mod_untrust_mod('{{post.PubkeyHex}}', this);">[UnTrust Moderator]</span>
<span class="mod" onclick="nntpchan_mod_decode_ipban('{{post.PostHash}}');">[Decode Secrets]</span>
2019-02-11 00:11:04 +05:00
{{/post.IsCtl}}
2018-10-26 16:39:19 +05:00
<a name="{{post.PostHash}}"></a><span class="topicline"><b data-subject="{{post.Subject}}" class="subject">{{post.Subject}}</b> {{post.Name}} <span class="published">{{post.Frontend}} || {{post.Date}}</span> {{{post.Pubkey}}} <a href="{{post.PostURL}}">[Reply]</a>
2017-04-19 16:27:40 +05:00
<a href="#" onclick="return quickreply('{{post.ShortHash}}', '{{post.PostHash}}', '{{post.PostURL}}');"> {{post.ShortHash}}</a>
2017-04-19 04:42:46 +05:00
</span>
<br /><br />
2019-02-11 00:11:04 +05:00
<span id="post_body_{{post.PostHash}}" class="message_span">{{{post.RenderBody}}}</span>
2019-03-02 21:10:05 +05:00
{{#post.OP}}
2019-03-02 21:19:14 +05:00
<script type="text/javascript">
2019-03-02 21:20:48 +05:00
fetch("/api/find?hash={{post.PostHash}}").then(function(resp) {
2019-03-02 21:22:59 +05:00
return resp.json();
}).then(function(j) {
2019-03-02 21:20:48 +05:00
console.log(j);
2019-03-02 21:24:22 +05:00
if (j.length) {
2019-03-02 21:20:48 +05:00
var e = document.getElementById("post_body_{{post.PostHash}}");
if(e) {
var u = new URL(j[0].ReferencedURI);
2019-03-02 21:27:25 +05:00
if(u.protocol === "https:" || u.protocol === "http:") {
2019-03-02 21:20:48 +05:00
var link = document.createElement("a");
link.href = u.toString();
link.innerText = "[Link]";
e.appendChild(txt);
}
}
2019-03-02 21:26:24 +05:00
else throw "wut";
2019-03-02 21:20:48 +05:00
}
2019-03-02 21:19:14 +05:00
}).catch(function(resp) {
2019-03-02 21:20:48 +05:00
2019-03-02 21:19:14 +05:00
});
</script>
2019-03-02 21:10:05 +05:00
{{/post.OP}}
2017-04-19 04:42:46 +05:00
<br style="clear: both;" />
2019-03-02 21:10:05 +05:00
2017-04-19 04:42:46 +05:00
</div>