This commit is contained in:
pa
2025-07-14 21:28:13 +09:00
committed by Natsumi
parent f53eed46cd
commit b5b962b198
5 changed files with 15 additions and 16 deletions

View File

@@ -1250,9 +1250,9 @@
if (action === 'confirm' && instance.inputValue !== world.ref.previewYoutubeId) {
if (instance.inputValue.length > 11) {
try {
var url = new URL(instance.inputValue);
var id1 = url.pathname;
var id2 = url.searchParams.get('v');
const url = new URL(instance.inputValue);
const id1 = url.pathname;
const id2 = url.searchParams.get('v');
if (id1 && id1.length === 12) {
instance.inputValue = id1.substring(1, 12);
}