diff --git a/Github_Reply_Comments/Github_Reply_Comments.user.js b/Github_Reply_Comments/Github_Reply_Comments.user.js index eea557b..cf522fa 100644 --- a/Github_Reply_Comments/Github_Reply_Comments.user.js +++ b/Github_Reply_Comments/Github_Reply_Comments.user.js @@ -12,7 +12,7 @@ // @updateURL https://github.com/jerone/UserScripts/raw/master/Github_Reply_Comments/Github_Reply_Comments.user.js // @supportURL https://github.com/jerone/UserScripts/issues // @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW -// @version 1.0.3 +// @version 1.0.4 // @icon https://github.githubassets.com/pinned-octocat.svg // @grant none // @include https://github.com/* @@ -120,10 +120,13 @@ var newComment = getCommentTextarea(this); + var author = comment.querySelector(".author"); + var authorLink = location.origin + (author.getAttribute("href") || "/" + author.textContent); + var text = newComment.value.length > 0 ? "\n" : ""; - text += String.format('[**@{0}**]({1}/{0}) commented on [{2}]({3} "{4} - Replied by Github Reply Comments"):\n{5}\n\n', - comment.querySelector(".author").textContent, - location.origin, + text += String.format('[**@{0}**]({1}) commented on [{2}]({3} "{4} - Replied by Github Reply Comments"):\n{5}\n\n', + author.textContent, + authorLink, timestamp.firstElementChild.getAttribute("title"), timestamp.href, timestamp.firstElementChild.getAttribute("datetime"), diff --git a/Github_Reply_Comments/README.md b/Github_Reply_Comments/README.md index 9d03f85..aeaf88d 100644 --- a/Github_Reply_Comments/README.md +++ b/Github_Reply_Comments/README.md @@ -20,6 +20,10 @@ reply button on an comment. ## Version History +* version **1.0.4** + + * 🐛 Fix link to authors with spaces in their name. Fixes ([#150](https://github.com/jerone/UserScripts/issues/150)). + * version **1.0.3** * 🐛 Fix broken timestamp detection ([#149](https://github.com/jerone/UserScripts/issues/149)).