File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1212// @updateURL https://github.com/jerone/UserScripts/raw/master/Github_Reply_Comments/Github_Reply_Comments.user.js
1313// @supportURL https://github.com/jerone/UserScripts/issues
1414// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
15- // @version 1.0.3
15+ // @version 1.0.4
1616// @icon https://github.githubassets.com/pinned-octocat.svg
1717// @grant none
1818// @include https://github.com/*
120120
121121 var newComment = getCommentTextarea ( this ) ;
122122
123+ var author = comment . querySelector ( ".author" ) ;
124+ var authorLink = location . origin + ( author . getAttribute ( "href" ) || "/" + author . textContent ) ;
125+
123126 var text = newComment . value . length > 0 ? "\n" : "" ;
124- text += String . format ( '[**@{0}**]({1}/{0} ) commented on [{2}]({3} "{4} - Replied by Github Reply Comments"):\n{5}\n\n' ,
125- comment . querySelector ( ". author" ) . textContent ,
126- location . origin ,
127+ text += String . format ( '[**@{0}**]({1}) commented on [{2}]({3} "{4} - Replied by Github Reply Comments"):\n{5}\n\n' ,
128+ author . textContent ,
129+ authorLink ,
127130 timestamp . firstElementChild . getAttribute ( "title" ) ,
128131 timestamp . href ,
129132 timestamp . firstElementChild . getAttribute ( "datetime" ) ,
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ reply button on an comment.
2020
2121## Version History
2222
23+ * version ** 1.0.4**
24+
25+ * 🐛 Fix link to authors with spaces in their name. Fixes ([ #150 ] ( https://github.com/jerone/UserScripts/issues/150 ) ).
26+
2327* version ** 1.0.3**
2428
2529 * 🐛 Fix broken timestamp detection ([ #149 ] ( https://github.com/jerone/UserScripts/issues/149 ) ).
You can’t perform that action at this time.
0 commit comments