mirror of
https://github.com/iv-org/invidious.git
synced 2026-10-25 22:39:14 -05:00
Refresh navigation, search results, login, channel cards, and the watch page while keeping native no-JavaScript fallbacks. Add scoped player gestures, theater mode, accessible action menus, theme controls, and focused regression coverage. Model: OpenAI gpt-5.6-sol (high reasoning) Harness: T3 Code Codex
21 lines
724 B
JavaScript
21 lines
724 B
JavaScript
'use strict';
|
|
|
|
// Native details handles disclosure without scripts. These only add dismissal.
|
|
(function () {
|
|
var menu = document.querySelector('.redesign-account-menu');
|
|
if (!menu) return;
|
|
var trigger = menu.querySelector('summary');
|
|
document.addEventListener('keydown', function (event) {
|
|
if (event.key === 'Escape' && menu.open) {
|
|
menu.open = false;
|
|
trigger.focus();
|
|
}
|
|
});
|
|
document.addEventListener('click', function (event) {
|
|
if (menu.open && !menu.contains(event.target)) menu.open = false;
|
|
});
|
|
document.addEventListener('focusin', function (event) {
|
|
if (menu.open && !menu.contains(event.target)) menu.open = false;
|
|
});
|
|
})();
|