add: custom emojis
fix: don't show reposts of posts from blocked users fix: don't show questions when they're from users you've blocked
This commit is contained in:
parent
9f187039e6
commit
275dd0a1eb
25 changed files with 697 additions and 61 deletions
|
@ -215,6 +215,28 @@ media_theme_pref();
|
|||
});
|
||||
|
||||
// hooks
|
||||
self.define("hooks::verify_emoji", (_) => {
|
||||
for (const post of document.querySelectorAll("[hook=verify_emojis]")) {
|
||||
const community_id = post.getAttribute("data-community");
|
||||
const owner_is_supporter =
|
||||
post.getAttribute("data-ownsup") === "true";
|
||||
|
||||
if (owner_is_supporter) {
|
||||
return;
|
||||
}
|
||||
|
||||
// not supporter; check emojis
|
||||
for (const img of post.querySelectorAll(".emoji")) {
|
||||
if (
|
||||
img.src.split("/api/v1/communities/")[1].split("/")[0] !==
|
||||
community_id
|
||||
) {
|
||||
img.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
self.define("hooks::scroll", (_, scroll_element, track_element) => {
|
||||
const goals = [150, 250, 500, 1000];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue