s4
diff s4-main.js @ 976:ae6c5df09f22
Add class="author" to link of author
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 29 May 2022 08:36:39 +0900 |
parents | ec5cb1790119 |
children | eb0ffd3b37c0 |
line diff
1.1 --- a/s4-main.js Sun May 29 07:55:44 2022 +0900 1.2 +++ b/s4-main.js Sun May 29 08:36:39 2022 +0900 1.3 @@ -1040,8 +1040,7 @@ 1.4 if (repltd) { 1.5 let txt = repltd.innerText, 1.6 authtd = repltd.parentNode.getElementsByTagName("td")[0], 1.7 - authAs = authtd.getElementsByTagName("a"), 1.8 - author = authAs[authAs.length-1].innerText, 1.9 + author = authtd.querySelector("a.author").innerText, 1.10 digest = txt.split("\n").splice(0, hoverTextLines).join("\n"); 1.11 return "[[ "+author+" ]]\n"+digest; 1.12 } else