File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -143,30 +143,10 @@ export default class MetadataParser {
143143 if ( metaImage ) {
144144 return new URL ( metaImage , this . #bookmark. url ) . href ;
145145 }
146- const youtubeThumbnail = this . #getYouTubeThumbnail( ) ;
147- if ( youtubeThumbnail ) {
148- return youtubeThumbnail ;
149- }
150146 const src = this . #searchPagePreview( ) ;
151147 return src ? new URL ( src , this . #bookmark. url ) . href : null ;
152148 }
153149
154- /**
155- * Gets YouTube video thumbnail URL from video ID.
156- * @returns {string|null } The YouTube thumbnail URL, or null if not a YouTube video.
157- * @private
158- */
159- #getYouTubeThumbnail( ) {
160- const { url } = this . #bookmark;
161- if ( ! url ) return null ;
162- const youtubeMatch = url . match ( / (?: y o u t u b e \. c o m \/ .* [ ? & ] v = | y o u t u \. b e \/ ) ( [ ^ " & ? / \s ] { 11 } ) / ) ;
163- if ( youtubeMatch ?. [ 1 ] ) {
164- return `https://img.youtube.com/vi/${ youtubeMatch [ 1 ] } /maxresdefault.jpg` ;
165- }
166-
167- return null ;
168- }
169-
170150 /**
171151 * Retrieves the domain from the bookmark URL.
172152 * @returns {string } The domain of the bookmark URL.
You can’t perform that action at this time.
0 commit comments