MCPcopy
hub / github.com/refined-github/refined-github / add

Function add

source/features/table-input.tsx:38–69  ·  view source on GitHub ↗
(container: HTMLElement)

Source from the content-addressed store, hash-verified

36}
37
38function add(container: HTMLElement): void {
39 container.classList.add('d-flex');
40
41 container.parentElement!.append(
42 <details className="details-reset details-overlay select-menu select-menu-modal-right hx_rsm my-auto">
43 {tooltipped(
44 'Add a table',
45 <summary
46 className="Button Button--iconOnly Button--invisible Button--medium"
47 role="button"
48 aria-haspopup="menu"
49 >
50 <TableIcon />
51 </summary>,
52 )}
53 <details-menu
54 className="select-menu-modal position-absolute right-0 hx_rsm-modal rgh-table-input"
55 role="menu"
56 >
57 {Array.from({length: 25}, (_, index) => (
58 <button
59 type="button"
60 role="menuitem"
61 className="rgh-tic btn-link"
62 data-x={(index % 5) + 1}
63 data-y={Math.floor(index / 5) + 1}
64 />
65 ))}
66 </details-menu>
67 </details>,
68 );
69}
70
71function init(signal: AbortSignal): void {
72 observe(actionBar, add, {signal});

Callers

nothing calls this directly

Calls 3

tooltippedFunction · 0.85
fromMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected