mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-13 22:00:33 +05:30
Shuffle URL params
The `list` and `index` params are the most important and come first now.
This commit is contained in:
parent
30c92ce1b7
commit
680dc1f962
@ -31,6 +31,11 @@ function get_playlist(plid, retries) {
|
||||
player.on('ended', function () {
|
||||
var url = new URL('https://example.com/embed/' + xhr.response.nextVideo);
|
||||
|
||||
url.searchParams.set('list', plid);
|
||||
if (!plid.startsWith('RD')) {
|
||||
url.searchParams.set('index', xhr.response.index);
|
||||
}
|
||||
|
||||
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
|
||||
url.searchParams.set('autoplay', '1');
|
||||
}
|
||||
@ -47,10 +52,6 @@ function get_playlist(plid, retries) {
|
||||
url.searchParams.set('local', video_data.params.local);
|
||||
}
|
||||
|
||||
url.searchParams.set('list', plid);
|
||||
if (!plid.startsWith('RD')) {
|
||||
url.searchParams.set('index', xhr.response.index);
|
||||
}
|
||||
location.assign(url.pathname + url.search);
|
||||
});
|
||||
}
|
||||
|
@ -154,6 +154,11 @@ function get_playlist(plid, retries) {
|
||||
player.on('ended', function () {
|
||||
var url = new URL('https://example.com/watch?v=' + xhr.response.nextVideo);
|
||||
|
||||
url.searchParams.set('list', plid);
|
||||
if (!plid.startsWith('RD')) {
|
||||
url.searchParams.set('index', xhr.response.index);
|
||||
}
|
||||
|
||||
if (video_data.params.autoplay || video_data.params.continue_autoplay) {
|
||||
url.searchParams.set('autoplay', '1');
|
||||
}
|
||||
@ -170,10 +175,6 @@ function get_playlist(plid, retries) {
|
||||
url.searchParams.set('local', video_data.params.local);
|
||||
}
|
||||
|
||||
url.searchParams.set('list', plid);
|
||||
if (!plid.startsWith('RD')) {
|
||||
url.searchParams.set('index', xhr.response.index);
|
||||
}
|
||||
location.assign(url.pathname + url.search);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user