use Intl.DateTimeFormat and Intl.NumberFormat instead of toLocaleString (#9444)
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import XWindow from '@/components/MkWindow.vue';
|
||||
import { lang } from '@/config';
|
||||
import { versatileLang } from '@/scripts/intl-const';
|
||||
|
||||
const props = defineProps<{
|
||||
url: string;
|
||||
@@ -35,11 +35,9 @@ let player = $ref({
|
||||
height: null,
|
||||
});
|
||||
|
||||
const requestLang = (lang ?? 'ja-JP').replace('ja-KS', 'ja-JP');
|
||||
|
||||
const ytFetch = (): void => {
|
||||
fetching = true;
|
||||
window.fetch(`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${requestLang}`).then(res => {
|
||||
window.fetch(`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${versatileLang}`).then(res => {
|
||||
res.json().then(info => {
|
||||
if (info.url == null) return;
|
||||
title = info.title;
|
||||
|
Reference in New Issue
Block a user