diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue index 2c265a9a7..a61e9fd81 100644 --- a/src/client/app/common/views/components/url-preview.vue +++ b/src/client/app/common/views/components/url-preview.vue @@ -5,6 +5,9 @@ +
@@ -52,6 +55,9 @@ export default Vue.extend({ icon: null, sitename: null, youtubeId: null, + spotifyId: null, + nicovideoId: null, + position: null, tweetUrl: null, misskeyUrl }; @@ -65,6 +71,9 @@ export default Vue.extend({ this.youtubeId = url.pathname; } else if (url.hostname == 'open.spotify.com') { this.spotifyId = url.pathname.split('/').reverse().filter(x => x !== '')[0]; + } else if (['nicovideo.jp', 'www.nicovideo.jp', 'nico.ms'].includes(url.hostname)) { + this.nicovideoId = url.pathname.split('/').reverse().filter(x => x !== '')[0]; + this.position = url.searchParams.get('from'); } else if (this.detail && url.hostname == 'twitter.com' && /^\/.+\/status(es)?\/\d+/.test(url.pathname)) { this.tweetUrl = url; const twttr = (window as any).twttr || {};