favorites lol
This commit is contained in:
@ -81,7 +81,6 @@ const flash = ({ type, msg }) => {
|
||||
_tags.reverse().forEach(tag => {
|
||||
const a = document.createElement("a");
|
||||
a.href = `/tag/${tag.tag}`;
|
||||
a.target = "_blank";
|
||||
a.style = "color: inherit !important";
|
||||
a.innerHTML = tag.tag;
|
||||
|
||||
@ -207,7 +206,23 @@ const flash = ({ type, msg }) => {
|
||||
|
||||
// span#favs
|
||||
const favcontainer = document.querySelector('span#favs');
|
||||
favcontainer.innerHTML = "favorites:" + JSON.stringify(Object.values(res.favs));
|
||||
favcontainer.innerHTML = "";
|
||||
|
||||
res.favs.forEach(f => {
|
||||
const a = document.createElement('a');
|
||||
a.href = `/user/${f.user}/favs`;
|
||||
a.setAttribute('tooltip', f.user);
|
||||
a.setAttribute('flow', 'down');
|
||||
|
||||
const img = document.createElement('img');
|
||||
img.src = `/t/${f.avatar}.png`;
|
||||
img.style.height = "32px";
|
||||
img.style.width = "32px";
|
||||
|
||||
a.insertAdjacentElement('beforeend', img);
|
||||
favcontainer.insertAdjacentElement('beforeend', a);
|
||||
favcontainer.innerHTML += " ";
|
||||
});
|
||||
}
|
||||
else {
|
||||
// lul
|
||||
|
Reference in New Issue
Block a user