Skip to content

Commit

Permalink
MIR-1361 Added title attribute to ror link
Browse files Browse the repository at this point in the history
  • Loading branch information
Possommi committed Oct 22, 2024
1 parent 90e2a96 commit 56c7f13
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ const RORSearch = {
for (const rorLink of rorLinks) {
RORSearch.search(rorLink.href).then(data => {
if (data.length > 0) {
rorLink.innerHTML = data[0].name;
if (data[0].name.length > 30) {
rorLink.innerHTML = data[0].name.substring(0, 30).trim() + " …";
} else {
rorLink.innerHTML = data[0].name;
}
rorLink.setAttribute("title", data[0].name + " | " + data[0].id);
}
});
}
Expand Down

0 comments on commit 56c7f13

Please sign in to comment.