fix: user avatar mime change from gif to avif
This commit is contained in:
parent
ffdb767518
commit
6e0f2985b9
20 changed files with 219 additions and 104 deletions
|
@ -117,7 +117,7 @@ media_theme_pref();
|
|||
);
|
||||
});
|
||||
|
||||
self.define("clean_date_codes", ({ $ }) => {
|
||||
self.define("clean_date_codes", async ({ $ }) => {
|
||||
for (const element of Array.from(document.querySelectorAll(".date"))) {
|
||||
if (element.getAttribute("data-unix")) {
|
||||
// this allows us to run the function twice on the same page
|
||||
|
@ -134,7 +134,7 @@ media_theme_pref();
|
|||
|
||||
element.setAttribute("title", then.toLocaleString());
|
||||
|
||||
let pretty = $.rel_date(then) || "";
|
||||
let pretty = (await $.rel_date(then)) || "";
|
||||
|
||||
if (
|
||||
(screen.width < 900 && pretty !== undefined) |
|
||||
|
@ -619,7 +619,6 @@ media_theme_pref();
|
|||
.catch(() => {
|
||||
// done scrolling, no more pages (http error)
|
||||
wrapper.removeEventListener("scroll", event);
|
||||
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
@ -652,7 +651,7 @@ media_theme_pref();
|
|||
);
|
||||
|
||||
self.define("hooks::check_reactions", async ({ $ }) => {
|
||||
const observer = $.offload_work_to_client_when_in_view(
|
||||
const observer = await $.offload_work_to_client_when_in_view(
|
||||
async (element) => {
|
||||
const like = element.querySelector(
|
||||
'[hook_element="reaction.like"]',
|
||||
|
@ -1292,7 +1291,7 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
|||
}, 150);
|
||||
|
||||
// run hooks
|
||||
const atto = ns("atto");
|
||||
const atto = await ns("atto");
|
||||
|
||||
atto.clean_date_codes();
|
||||
atto.clean_poll_date_codes();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue