
                    setTimeout(() => initLazyLoading(), 50);

                    // Save view preference
                    storage.setItem('view_preference', 'list');
                }
            });

            // Sort change
            sortSelect.addEventListener('change', () => {
                sortDatasets();
                displayCurrentPage();

                // Save sort preference
                storage.setItem('sort_preference', sortSelect.value);
            });

            // History 