whoopsie a fucky wuckie appeared xD
This commit is contained in:
@@ -8,9 +8,10 @@
|
|||||||
const usernameEl = document.querySelector("a#a_username");
|
const usernameEl = document.querySelector("a#a_username");
|
||||||
return {
|
return {
|
||||||
postid: +idLink.innerText,
|
postid: +idLink.innerText,
|
||||||
// Prefer data-username (raw DB username) over innerText (may be a display name)
|
// data-username holds the raw DB username; data-author-id holds the user's numeric ID.
|
||||||
poster: (usernameEl?.dataset?.username || '').trim() || usernameEl?.innerText?.trim() || null,
|
// Never fall back to innerText — it may be a display name or the literal string 'unknown'.
|
||||||
authorId: usernameEl?.dataset?.authorId || null,
|
poster: (usernameEl?.dataset?.username || '').trim() || null,
|
||||||
|
authorId: (usernameEl?.dataset?.authorId || '').trim() || null,
|
||||||
tags: [...inner.querySelectorAll(".badge")].map(t => t.innerText.slice(0, -2))
|
tags: [...inner.querySelectorAll(".badge")].map(t => t.innerText.slice(0, -2))
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ export default {
|
|||||||
) as contribution
|
) as contribution
|
||||||
` : db`0 as contribution`}
|
` : db`0 as contribution`}
|
||||||
from items
|
from items
|
||||||
left join "user" author_u on author_u.user = items.username
|
left join "user" author_u on author_u."user" = items.username or author_u.login = items.username
|
||||||
left join user_options uo on uo.user_id = author_u.id
|
left join user_options uo on uo.user_id = author_u.id
|
||||||
left join tags_assign on tags_assign.item_id = items.id
|
left join tags_assign on tags_assign.item_id = items.id
|
||||||
left join tags on tags.id = tags_assign.tag_id
|
left join tags on tags.id = tags_assign.tag_id
|
||||||
@@ -434,7 +434,7 @@ export default {
|
|||||||
from items
|
from items
|
||||||
left join favorites on favorites.item_id = items.id
|
left join favorites on favorites.item_id = items.id
|
||||||
left join "user" fav_u on fav_u.id = favorites.user_id
|
left join "user" fav_u on fav_u.id = favorites.user_id
|
||||||
left join "user" author_u on author_u.user = items.username
|
left join "user" author_u on author_u."user" = items.username or author_u.login = items.username
|
||||||
left join "user_options" uo on uo.user_id = author_u.id
|
left join "user_options" uo on uo.user_id = author_u.id
|
||||||
${user_id ? db`left join user_video_views uvv on uvv.video_id = items.id and uvv.user_id = ${user_id}` : db``}
|
${user_id ? db`left join user_video_views uvv on uvv.video_id = items.id and uvv.user_id = ${user_id}` : db``}
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user