video end setting

This commit is contained in:
Simon
2026-06-24 20:19:28 +00:00
parent 9fe7511b4d
commit 48a15759fc
6 changed files with 79 additions and 4 deletions

View File

@@ -16,6 +16,11 @@ App.ui = App.ui || {};
if (select) select.value = App.storage.getPreferredQuality();
};
App.ui.applyFeedEndBehavior = function() {
const select = document.getElementById('feed-end-select');
if (select) select.value = App.storage.getFeedEndBehavior();
};
// Toast helper for playback + network errors.
App.ui.showError = function(message) {
const toast = document.getElementById('error-toast');
@@ -281,6 +286,17 @@ App.ui = App.ui || {};
};
}
const feedEndSelect = document.getElementById('feed-end-select');
if (feedEndSelect) {
feedEndSelect.value = App.storage.getFeedEndBehavior();
feedEndSelect.onchange = () => {
App.storage.setFeedEndBehavior(feedEndSelect.value);
if (App.feed && typeof App.feed.applyEndBehavior === 'function') {
App.feed.applyEndBehavior();
}
};
}
if (favoritesToggle) {
favoritesToggle.checked = App.favorites.isVisible();
favoritesToggle.onchange = () => {