mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
fix(youtube): interpolate videoId in the share-to-X tweet text
The share button built the tweet text from a single-quoted string containing ${videoId}, so it shared the literal 'watch?v=${videoId}' instead of the actual video URL. Use a template literal so videoId interpolates.
This commit is contained in:
@@ -637,7 +637,7 @@ export const YouTubePlayerView: FC<{}> = () =>
|
|||||||
if (videoId)
|
if (videoId)
|
||||||
{
|
{
|
||||||
const url = `https://twitter.com/intent/tweet?text=${encodeURIComponent(
|
const url = `https://twitter.com/intent/tweet?text=${encodeURIComponent(
|
||||||
'Now watching: https://youtube.com/watch?v=${videoId}',
|
`Now watching: https://youtube.com/watch?v=${videoId}`,
|
||||||
)}`;
|
)}`;
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user