I've made a couple of fixes to make this work again, it does, but produces a strange error on Stack Exchange's code, in the replace
bellow:
//This is where the real work starts - add the 'auto' link next to each comment 'help' link
//use most local root-nodes possible (have to exist on page load) - #questions is for review pages
$("#content").delegate(".comments-link", "click", function () {
var divid = $(this).attr('id').replace('-link', '');
I'll leave a copy of my script for convenience, the modifications are indicated with comments:
// ==UserScript==
// @name stackoverflow-comment-reply
// @namespace stackoverflow
// @description Add "reply" links to comments
// @version 1.1b
// @match *://stackoverflow.com/*
// @match *://serverfault.com/*
// @match *://superuser.com/*
// @match *://meta.stackoverflow.com/*
// @match *://meta.serverfault.com/*
// @match *://meta.superuser.com/*
// @match *://stackapps.com/*
// @match *://*.stackexchange.com/*
// @match *://askubuntu.com/*
// @match *://meta.askubuntu.com/*
// @match *://answers.onstartups.com/*
// @match *://meta.answers.onstartups.com/*
// @match *://mathoverflow.net/*
// @match *://area51.stackexchange.com/proposals/*
// @author Benjamin Dumke-von der Ehe
// ==/UserScript==
// Thanks to Shog9 for this idea for making the script work in both
// Chrome and Firefox:
// http://meta.stackoverflow.com/questions/46562
function with_jquery(f) {
var script = document.createElement("script");
script.type = "text/javascript";
script.textContent = "(" + f.toString() + ")(jQuery)";
document.body.appendChild(script);
};
with_jquery(function($) {
$(document).ajaxComplete(function(){
setTimeout(function () {
$(".comments").each(put_reply_links);
}, 100);
});
// event handler for a click on the reply links
function reply() {
/* MOD: changed the following 2 lines to detect the new Add Comment link */
var commentlinkId = $(this).closest(".comments").next().attr("id");
var commentlink = $('#'+commentlinkId + ' a.js-add-link')[0].click();
var username = goodify($(this).prev().text().replace(/♦/, ""))
var formid = commentlinkId.replace(/^.*-(\d+)$/, "add-comment-$1");
var ta = $("#" + formid + " textarea")[0];
var start = ta.selectionStart;
var end = ta.selectionEnd;
var shift = username.length + 3;
ta.value = "@" + username + ": " + ta.value;
ta.focus();
ta.selectionStart = start + shift;
ta.selectionEnd = end + shift;
};
function put_reply_links() {
$(this).find(".comment:not(:has(.reply-link)) .comment-user").each(function () {
/* MOD: // changed click by on(click) */
$("<span class='reply-link' style='cursor:pointer;' title='reply'> ↵</span>").on('click',reply).insertAfter(this);
});
}
$(".comments").each(put_reply_links);
function goodify(s) {
return s.replace(/ +/g, "");
}
});