mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
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:
parent
d77586d02d
commit
36c7d4270b
1 changed files with 2 additions and 3 deletions
|
@ -60,9 +60,8 @@ function addCurrentTimeToURL(url) {
|
||||||
var currentTime = Math.ceil(player.currentTime());
|
var currentTime = Math.ceil(player.currentTime());
|
||||||
if (currentTime > 0)
|
if (currentTime > 0)
|
||||||
urlUsed.searchParams.set('t', currentTime);
|
urlUsed.searchParams.set('t', currentTime);
|
||||||
else
|
else if (urlUsed.searchParams.has('t'))
|
||||||
if (urlUsed.searchParams.has('t'))
|
urlUsed.searchParams.delete('t');
|
||||||
urlUsed.searchParams.delete('t');
|
|
||||||
return urlUsed;
|
return urlUsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue