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/js/nntpchan/reply.js
Jeff Becker cfa83a7db8 more
2017-01-16 14:39:08 -05:00

30 lines
695 B
JavaScript

// reply box function
function nntpchan_reply(parent, shorthash) {
if (parent && document.dynreply) {
var boardname = parent.dataset.newsgroup;
var rootmsg = parent.dataset.rootmsgid;
var replyto = getReplyTo();
// set target
replyto.setBoard(boardname);
replyto.setRoot(rootmsg);
// show it
replyto.show();
}
var elem;
if(document.reply && document.reply.visible()) {
elem = document.reply.message;
} else {
elem = document.getElementById("postform_message");
}
if ( elem )
{
elem.value += ">>" + shorthash.substr(0,10) + "\n";
}
}
function init(prefix) {
}