MCPcopy Create free account
hub / github.com/error311/FileRise / bindFileListContextMenu

Function bindFileListContextMenu

public/js/fileMenu.js:271–288  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269// keep your renderFileTable wrapper as-is
270
271export function bindFileListContextMenu() {
272 const container = document.getElementById('fileList');
273 const menu = qMenu();
274 if (!container || !menu) return;
275
276 localizeMenu();
277
278 // Open on right click in the table
279 container.oncontextmenu = fileListContextMenuHandler;
280
281 // Bind once
282 if (!__ctxBoundOnce) {
283 document.addEventListener('click', docClickClose);
284 document.addEventListener('keydown', docKeyClose);
285 menu.addEventListener('click', menuClickDelegate); // handles actions
286 __ctxBoundOnce = true;
287 }
288}
289
290// Rebind after table render (keeps your original behavior)
291(function () {

Callers 3

renderFileTableFunction · 0.85
renderGalleryViewFunction · 0.85
fileMenu.jsFile · 0.85

Calls 2

qMenuFunction · 0.85
localizeMenuFunction · 0.85

Tested by

no test coverage detected