Lint conditional deletion of t in addCurrentTimeToURL inside player script

Follow lint indications :
https://github.com/iv-org/invidious/pull/2912#discussion_r811474927
This commit is contained in:
Féry Mathieu (Mathius) 2022-02-22 00:27:00 +01:00
parent d77586d02d
commit 36c7d4270b
No known key found for this signature in database
GPG Key ID: F9CCC80C18A59037

View File

@ -60,9 +60,8 @@ function addCurrentTimeToURL(url) {
var currentTime = Math.ceil(player.currentTime());
if (currentTime > 0)
urlUsed.searchParams.set('t', currentTime);
else
if (urlUsed.searchParams.has('t'))
urlUsed.searchParams.delete('t');
else if (urlUsed.searchParams.has('t'))
urlUsed.searchParams.delete('t');
return urlUsed;
}