mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-22 00:43:50 +01:00
fix: /share
から/{国コード}/share
へのリダイレクト時にクエリパラメータが消える (#76)
* i18nRedirectorの修正 & TODO解消 * コメント削除
This commit is contained in:
parent
8450c38082
commit
9a0e2bf1b6
@ -132,7 +132,7 @@ const generatedUrl = computed(() => {
|
||||
visibleAccts: (visibility.value === 'specified') ? recipents.value.split('\n').join(',') : undefined,
|
||||
};
|
||||
|
||||
const baseUrl = 'https://misskey-hub.net'; /* ←正式リリース時に runtimeConfig.public.baseUrl に置換 */
|
||||
const baseUrl = runtimeConfig.public.baseUrl;
|
||||
return withQuery(joinURL(baseUrl, '/share/'), query);
|
||||
});
|
||||
|
||||
|
@ -29,7 +29,7 @@ export default defineNitroPlugin((nitroApp) => {
|
||||
|
||||
html.head = remainingList.map((v) => v + '\n');
|
||||
//@ts-ignore
|
||||
html.head.push('<script type="text/javascript">const s = ' + JSON.stringify(locales.map((l) => l.code)) + '; const d = new URLSearchParams(document.cookie); if (d.get(\'i18n_redirected\')) { location.replace(\'/\' + d.get(\'i18n_redirected\') + location.pathname); } else if (s.includes(navigator.language.split("-")[0])) { location.replace(\'/\' + navigator.language.split("-")[0] + location.pathname); } else { location.replace(\'/ja\' + location.pathname); }</script>\n');
|
||||
html.head.push('<script type="text/javascript">const s = ' + JSON.stringify(locales.map((l) => l.code)) + '; const d = new URLSearchParams(document.cookie); if (d.get(\'i18n_redirected\')) { location.replace(\'/\' + d.get(\'i18n_redirected\') + location.pathname + location.search); } else if (s.includes(navigator.language.split("-")[0])) { location.replace(\'/\' + navigator.language.split("-")[0] + location.pathname + location.search); } else { location.replace(\'/ja\' + location.pathname + location.search); }</script>\n');
|
||||
html.body = [
|
||||
'\n<noscript>Please enable Javascript to see this page properly.</noscript>\n',
|
||||
`<noscript>${links.join(', ')}</noscript>\n`,
|
||||
|
Loading…
Reference in New Issue
Block a user