feat: enable bs tooltips for all elements with title attr

This commit is contained in:
Oliver Booth 2023-08-08 21:05:09 +01:00
parent 0120ac6dee
commit 2d64bccc50
Signed by: oliverbooth
GPG Key ID: 725DB725A0D9EE61

View File

@ -16,7 +16,7 @@ declare const katex: any;
block.innerHTML = content;
});
document.querySelectorAll("img[title]").forEach((img) => {
document.querySelectorAll("[title]").forEach((img) => {
img.setAttribute("data-bs-toggle", "tooltip");
img.setAttribute("data-bs-placement", "bottom");
img.setAttribute("data-bs-html", "true");