feat(frontend): headタグに任意のタグを追加できるようにする (MisskeyIO#973)

INFRA-84
This commit is contained in:
Laica Lunasys 2025-04-12 21:01:03 +09:00 committed by GitHub
parent 485f427092
commit bc1fe0e203
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View file

@ -127,6 +127,8 @@ type Source = {
perUserNotificationsMaxCount?: number; perUserNotificationsMaxCount?: number;
deactivateAntennaThreshold?: number; deactivateAntennaThreshold?: number;
pidFile: string; pidFile: string;
extraHead?: string;
}; };
export type Config = { export type Config = {
@ -232,6 +234,7 @@ export type Config = {
perUserNotificationsMaxCount: number; perUserNotificationsMaxCount: number;
deactivateAntennaThreshold: number; deactivateAntennaThreshold: number;
pidFile: string; pidFile: string;
extraHead: string | undefined;
}; };
const _filename = fileURLToPath(import.meta.url); const _filename = fileURLToPath(import.meta.url);
@ -341,6 +344,7 @@ export function loadConfig(): Config {
perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500, perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500,
deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7), deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7),
pidFile: config.pidFile, pidFile: config.pidFile,
extraHead: config.extraHead,
}; };
} }

View file

@ -197,6 +197,7 @@ export class ClientServerService {
instanceUrl: this.config.url, instanceUrl: this.config.url,
metaJson: htmlSafeJsonStringify(await this.metaEntityService.packDetailed(meta)), metaJson: htmlSafeJsonStringify(await this.metaEntityService.packDetailed(meta)),
now: Date.now(), now: Date.now(),
extraHead: this.config.extraHead,
}; };
} }

View file

@ -73,6 +73,8 @@ html
script(src=`/assets/boot.${version}.js`) script(src=`/assets/boot.${version}.js`)
| !{extraHead}
body body
noscript: p noscript: p
| JavaScriptを有効にしてください | JavaScriptを有効にしてください