Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shu8 committed Feb 25, 2018
1 parent 875ff0e commit c11eda0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions sox.css
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ hr.or:after {

.soxReplyLink {
cursor: pointer;
float: right;
}


Expand Down
4 changes: 2 additions & 2 deletions sox.features.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,15 +587,15 @@
if (!$(this).find('.soxReplyLink').length) { //if the link doesn't already exist
if ($('.topbar-links a span:eq(0)').text() != $(this).find('.comment-text a.comment-user').text()) { //make sure the link is not added to your own comments
$(this).find('.comment-text').css('overflow-x', 'hidden');
$(this).append('<span class="soxReplyLink" title="reply to this user" style="margin-left: -7px">&crarr;</span>');
$(this).find('.comment-text').append('<span class="soxReplyLink" title="reply to this user" style="margin-left: -7px">&crarr;</span>');
}
}
});
}

$(document).on('click', 'span.soxReplyLink', function() {
var parentDiv = $(this).parent().parent().parent().parent();
var textToAdd = '@' + $(this).parent().find('.comment-text a.comment-user').text().replace(/\s/g, '').replace(//, ''); //eg. @USERNAME
var textToAdd = '@' + $(this).parent().find('a.comment-user').text().replace(/\s/g, '').replace(//, ''); //eg. @USERNAME
if (!parentDiv.find('textarea').length) parentDiv.next('div').find('a.js-add-link')[0].click(); //show the textarea, http://stackoverflow.com/a/10559680/

var $textarea = parentDiv.find('textarea');
Expand Down
2 changes: 1 addition & 1 deletion sox.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Stack Overflow Extras (SOX)
// @namespace https://github.com/soscripted/sox
// @version 2.1.0 DEV
// @version 2.1.1 DEV
// @description Extra optional features for Stack Overflow and Stack Exchange sites
// @contributor ᴉʞuǝ (stackoverflow.com/users/1454538/)
// @contributor ᔕᖺᘎᕊ (stackexchange.com/users/4337810/)
Expand Down

0 comments on commit c11eda0

Please sign in to comment.