s4
changeset 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 |
files | s4-blog.sh s4-main.js |
diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
line diff
1.1 --- a/s4-blog.sh Sun May 29 07:55:44 2022 +0900 1.2 +++ b/s4-blog.sh Sun May 29 08:36:39 2022 +0900 1.3 @@ -505,7 +505,7 @@ 1.4 cat<<EOF 1.5 <tr id="$id"> 1.6 <td class="$tdcls">${picon}__EDIT__<a href="#$aid">#$aid</a> 1.7 -<a href="$hlink+$uid" title="${author%@*}">`echo $uname|htmlescape`</a> 1.8 +<a class="author" href="$hlink+$uid" title="${author%@*}">`echo $uname|htmlescape`</a> 1.9 <span title="$tm">${reki:-$tm}</span> 1.10 <__NOTIFY__></td> 1.11 EOF
2.1 --- a/s4-main.js Sun May 29 07:55:44 2022 +0900 2.2 +++ b/s4-main.js Sun May 29 08:36:39 2022 +0900 2.3 @@ -1040,8 +1040,7 @@ 2.4 if (repltd) { 2.5 let txt = repltd.innerText, 2.6 authtd = repltd.parentNode.getElementsByTagName("td")[0], 2.7 - authAs = authtd.getElementsByTagName("a"), 2.8 - author = authAs[authAs.length-1].innerText, 2.9 + author = authtd.querySelector("a.author").innerText, 2.10 digest = txt.split("\n").splice(0, hoverTextLines).join("\n"); 2.11 return "[[ "+author+" ]]\n"+digest; 2.12 } else