MCPcopy Index your code
hub / github.com/refined-github/refined-github / toggleSubmenu

Function toggleSubmenu

source/features/quick-comment-hiding.tsx:68–76  ·  view source on GitHub ↗
(hideButton: Element, show: boolean)

Source from the content-addressed store, hash-verified

66// Hide it when dropdown closes.
67// Uses `v-hidden` to avoid conflicts with `close-out-of-view-modals`
68function toggleSubmenu(hideButton: Element, show: boolean): void {
69 const dropdown = closestElement('details', hideButton);
70
71 // Native dropdown
72 $('details-menu', dropdown).classList.toggle('v-hidden', show);
73
74 // "Hide comment" dropdown
75 $(formSelector, dropdown).classList.toggle('v-hidden', !show);
76}
77
78function resetDropdowns(event: DelegateEvent): void {
79 toggleSubmenu(event.delegateTarget, false);

Callers 2

resetDropdownsFunction · 0.85
showSubmenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected