mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-09-27 20:11:15 +02:00
12 lines
382 B
JavaScript
12 lines
382 B
JavaScript
/**
|
|
* Determines whether a URL targets a playlist.
|
|
*
|
|
* The detection is based on the presence of the YouTube
|
|
* playlist query parameter (`list`).
|
|
*
|
|
* @param {string} url - URL to inspect.
|
|
* @returns {boolean} True if the URL appears to be a playlist.
|
|
*/
|
|
export function isUrlPlaylist(url) {
|
|
return url.includes("?list=") || url.includes("&list=") || url.includes("@");
|
|
} |