| null = JSON.parse(tag.dataset.miI18nCtx ?? 'null');
if (!key) {
console.warn("[i18n] Key doesn't exist!", tag);
@@ -48,4 +54,4 @@ export function embedInitI18n() {
tag.innerText = key.reduce((o, i) => o[i], i18n.ts);
}
});
-}
\ No newline at end of file
+}
diff --git a/packages/frontend/src/embed/scripts/link-anime.ts b/packages/frontend/src/embed/scripts/link-anime.ts
index f1afd56ea6..20d49f8bf3 100644
--- a/packages/frontend/src/embed/scripts/link-anime.ts
+++ b/packages/frontend/src/embed/scripts/link-anime.ts
@@ -30,4 +30,4 @@ export function embedInitLinkAnime() {
});
});
}
-}
\ No newline at end of file
+}
diff --git a/packages/frontend/src/embed/scripts/parse-emoji.ts b/packages/frontend/src/embed/scripts/parse-emoji.ts
index 17fe6ab5d1..cf0816c87c 100644
--- a/packages/frontend/src/embed/scripts/parse-emoji.ts
+++ b/packages/frontend/src/embed/scripts/parse-emoji.ts
@@ -3,17 +3,17 @@ import { char2twemojiFilePath } from '@/scripts/emoji-base';
const char2path = char2twemojiFilePath;
const remoteCustomEmojiEl = document.getElementById("remote_custom_emojis");
-let remoteCustomEmoji: { name: string; url: string; host?: string; }[] = [];
+let remoteCustomEmojis: { name: string; url: string; host?: string; }[] = [];
if (remoteCustomEmojiEl) {
- remoteCustomEmoji = JSON.parse(remoteCustomEmojiEl.innerHTML);
+ remoteCustomEmojis = JSON.parse(remoteCustomEmojiEl.innerHTML);
}
function getCustomEmojiName(ceNameRaw: string) {
- return (ceNameRaw.startsWith(":") ? ceNameRaw.substr(1, ceNameRaw.length - 2) : ceNameRaw).replace('@.', '')
+ return (ceNameRaw.startsWith(":") ? ceNameRaw.substr(1, ceNameRaw.length - 2) : ceNameRaw).replace('@.', '');
}
function getCustomEmojiUrl(ceName: string) {
- const remote = remoteCustomEmoji.find((e) => e.name === ceName);
+ const remote = remoteCustomEmojis.find((emoji) => emoji.name === ceName);
if (remote) {
return remote.url;
}
@@ -36,4 +36,4 @@ export function parseEmoji() {
el.innerHTML = emojiEl.outerHTML;
}
});
-}
\ No newline at end of file
+}
diff --git a/packages/frontend/src/embed/scripts/parse-mfm.ts b/packages/frontend/src/embed/scripts/parse-mfm.ts
index 82165fb13f..14460d31dc 100644
--- a/packages/frontend/src/embed/scripts/parse-mfm.ts
+++ b/packages/frontend/src/embed/scripts/parse-mfm.ts
@@ -50,16 +50,16 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
case 'bold': {
const el = document.createElement("b");
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
return [el];
}
case 'strike': {
const el = document.createElement("del");
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
return [el];
}
@@ -67,8 +67,8 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
case 'italic': {
const el = document.createElement("i");
el.style.fontStyle = 'oblique';
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
return [el];
}
@@ -131,25 +131,25 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
case 'x2': {
const el = document.createElement("span");
el.classList.add('mfm-x2');
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
- })
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
+ });
return [el];
}
case 'x3': {
const el = document.createElement("span");
el.classList.add('mfm-x3');
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
- })
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
+ });
return [el];
}
case 'x4': {
const el = document.createElement("span");
el.classList.add('mfm-x4');
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
- })
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
+ });
return [el];
}
case 'font': {
@@ -168,9 +168,9 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
case 'blur': {
const el = document.createElement("span");
el.classList.add('_mfm_blur_');
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
- })
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
+ });
return [el];
}
case 'rainbow': {
@@ -214,15 +214,15 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
}
if (style == null) {
const el = document.createElement("span");
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
el.innerHTML = `$[${token.props.name} ${el.innerHTML}]`;
return [el];
} else {
const el = document.createElement("span");
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
el.setAttribute('style', `display: inline-block; ${style}`);
return [el];
@@ -232,8 +232,8 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
case 'small': {
const el = document.createElement("small");
el.style.opacity = '.7';
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
return [el];
}
@@ -241,8 +241,8 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
case 'center': {
const el = document.createElement("div");
el.style.textAlign = "center";
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
return [el];
}
@@ -262,8 +262,8 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
el.href = token.props.url;
el.target = '_blank';
el.rel = 'nofollow noopener';
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
return [el];
}
@@ -319,8 +319,8 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
case 'quote': {
const el = document.createElement('div');
el.setAttribute('style', QUOTE_STYLE);
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
return [el];
}
@@ -370,8 +370,8 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
case 'plain': {
const el = document.createElement('span');
- genEl(token.children).forEach((e) => {
- el.appendChild(e as HTMLElement);
+ genEl(token.children).forEach((child) => {
+ el.appendChild(child as HTMLElement);
});
return [el];
}
@@ -397,4 +397,4 @@ export function parseMfm(text: string, useAnim: boolean = false): HTMLDivElement
});
return el;
-}
\ No newline at end of file
+}
diff --git a/packages/frontend/src/embed/scripts/render-not-found.ts b/packages/frontend/src/embed/scripts/render-not-found.ts
index 7bd34a31a6..ea0bfd7b0c 100644
--- a/packages/frontend/src/embed/scripts/render-not-found.ts
+++ b/packages/frontend/src/embed/scripts/render-not-found.ts
@@ -9,14 +9,13 @@ export function renderNotFound() {
- ${i18n.ts.notFound}
- ${i18n.ts.notFoundDescription}
+ ${ i18n.ts.notFound }
+ ${ i18n.ts.notFoundDescription }
`;
-
}
-}
\ No newline at end of file
+}
diff --git a/packages/frontend/src/embed/scripts/theme.ts b/packages/frontend/src/embed/scripts/theme.ts
index 9920257d78..3adac761af 100644
--- a/packages/frontend/src/embed/scripts/theme.ts
+++ b/packages/frontend/src/embed/scripts/theme.ts
@@ -81,7 +81,6 @@ export function applyTheme(theme: Theme, persist = true) {
miLocalStorage.setItem('theme', JSON.stringify(props));
miLocalStorage.setItem('colorSchema', colorSchema);
}
-
}
function compile(theme: Theme): Record {