diff options
| author | Féry Mathieu (Mathius) <ferymathieuy@gmail.com> | 2022-02-17 22:22:04 +0100 |
|---|---|---|
| committer | Féry Mathieu (Mathius) <ferymathieuy@gmail.com> | 2022-02-17 22:22:04 +0100 |
| commit | 1e3f4ed3983f3b101a259f8164511665f25f878e (patch) | |
| tree | 472912dee7a893644ae28b2f8341358f49c7bbd3 /assets | |
| parent | 7048193f00a80617093eb9d8e1bc4557159afd74 (diff) | |
| download | invidious-1e3f4ed3983f3b101a259f8164511665f25f878e.tar.gz invidious-1e3f4ed3983f3b101a259f8164511665f25f878e.tar.bz2 invidious-1e3f4ed3983f3b101a259f8164511665f25f878e.zip | |
Lint player.js
Follow lint indications :
- https://github.com/iv-org/invidious/pull/2895#discussion_r809461103
- https://github.com/iv-org/invidious/pull/2895#discussion_r809461622
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/player.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/assets/js/player.js b/assets/js/player.js index 5498df48..3c58cb62 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -185,9 +185,7 @@ player.playbackRate(video_data.params.speed); * @returns cookieValue */ function getCookieValue(name) { - var value = document.cookie.split(";").filter(item => { - return item.includes(name + "="); - }); + var value = document.cookie.split(";").filter(item => item.includes(name + "=")); return value != null && value.length >= 1 ? value[0].substring((name + "=").length, value[0].length) : null; } @@ -207,7 +205,7 @@ function updateCookie(newVolume, newSpeed) { document.cookie = document.cookie.replace(getCookieValue('PREFS'), encodeURIComponent(JSON.stringify(cookieJson))); } else { var date = new Date(); - //Set expiration in 2 year + // Set expiration in 2 year date.setTime(date.getTime() + 63115200); document.cookie = 'PREFS=' + encodeURIComponent(JSON.stringify({ 'volume': volumeValue, 'speed': speedValue })) + |
