mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-08 01:15:08 -04:00
Removed the purging of the query parameters
This commit is contained in:
parent
995df2d296
commit
e8c2388589
3 changed files with 14 additions and 5 deletions
|
@ -32,14 +32,22 @@ function button_press(){
|
|||
// On the first page, the stored continuation token is null.
|
||||
if (prev_ctoken === null) {
|
||||
sessionStorage.removeItem(CONT_CACHE_KEY);
|
||||
window.location.href = window.location.href.split('?')[0];
|
||||
let url = window.location.href.split('?')[0];
|
||||
let params = window.location.href.split('?')[1];
|
||||
let url_params = new URLSearchParams(params);
|
||||
url_params.delete('continuation');
|
||||
window.location.href = `${url}?${url_params.toString()}`;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sessionStorage.setItem(CONT_CACHE_KEY, JSON.stringify(prev_data));
|
||||
let url = window.location.href.split('?')[0];
|
||||
let params = window.location.href.split('?')[1];
|
||||
let url_params = new URLSearchParams(params);
|
||||
url_params.set("continuation", prev_ctoken);
|
||||
|
||||
window.location.href = `${window.location.pathname}?continuation=${prev_ctoken}`;
|
||||
window.location.href = `${url}?${url_params.toString()}`;
|
||||
};
|
||||
|
||||
addEventListener('DOMContentLoaded', function(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue