mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-11-04 02:53:06 +00:00 
			
		
		
		
	Fix back function in album pagination
This commit is contained in:
		@@ -69,7 +69,7 @@ function getCSRFToken() {
 | 
			
		||||
 | 
			
		||||
const initialUrlParams = new URLSearchParams(window.location.search);
 | 
			
		||||
 | 
			
		||||
function update_query_string(key, value) {
 | 
			
		||||
function update_query_string(key, value, push = true) {
 | 
			
		||||
    const url = new URL(window.location.href);
 | 
			
		||||
    if (!value) {
 | 
			
		||||
        // If the value is null, undefined or empty => delete it
 | 
			
		||||
@@ -81,5 +81,8 @@ function update_query_string(key, value) {
 | 
			
		||||
    } else {
 | 
			
		||||
        url.searchParams.set(key, value);
 | 
			
		||||
    }
 | 
			
		||||
    history.pushState(null, document.title, url.toString());
 | 
			
		||||
 | 
			
		||||
    if (push){
 | 
			
		||||
        history.pushState(null, document.title, url.toString());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user