Merge pull request #246 from B0pol/autoplay

Only append autoplay parameter if necessary
This commit is contained in:
Simon Brazell 2021-06-16 22:53:44 +10:00 committed by GitHub
commit 4f9c130396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -279,7 +279,9 @@ function redirectYouTube(url, initiator, type) {
if (invidiousSubtitles) { if (invidiousSubtitles) {
url.searchParams.append("subtitles", invidiousSubtitles); url.searchParams.append("subtitles", invidiousSubtitles);
} }
url.searchParams.append("autoplay", invidiousAutoplay ? 1 : 0); if (invidiousAutoplay) {
url.searchParams.append("autoplay", 1);
}
return `${ return `${
invidiousInstance || commonHelper.getRandomInstance(invidiousRandomPool) invidiousInstance || commonHelper.getRandomInstance(invidiousRandomPool)