Skip to content

Instantly share code, notes, and snippets.

@chimo
Forked from mrvdb/*vc-diff*.diff
Last active January 3, 2016 02:19
Show Gist options
  • Select an option

  • Save chimo/8395275 to your computer and use it in GitHub Desktop.

Select an option

Save chimo/8395275 to your computer and use it in GitHub Desktop.
Adding the following to SN's config.php should prepend the @-nickname of the person you're replying to in the web-UI's textarea.
function replyAtMention($action) {
$action->inlineScript('(function ($) {
SN.U.NoticeReply = function () {};
$("#content .notice_reply").die("click")
.live("click", function (e) {
e.preventDefault();
var $notice = $(this).closest("li.notice"),
replyNick = "@" + $notice.find(".vcard.author a.url").attr("title");
SN.U.NoticeInlineReplyTrigger($notice, replyNick);
});
}(jQuery));');
}
Event::addHandler('EndShowScripts', 'replyAtMention');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment