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

Function linkifyIcon

source/features/quick-file-edit.tsx:15–24  ·  view source on GitHub ↗
(fileIcon: Element)

Source from the content-addressed store, hash-verified

13import observe from '../helpers/selector-observer.js';
14
15async function linkifyIcon(fileIcon: Element): Promise<void> {
16 const fileLink = $('.react-directory-filename-cell a', fileIcon.parentElement!);
17
18 const url = new GitHubFileUrl(fileLink.href).assign({
19 route: 'edit',
20 });
21
22 wrap(fileIcon, <a href={url.href} className="rgh-quick-file-edit" />);
23 fileIcon.after(<PencilIcon />);
24}
25
26async function init(signal: AbortSignal): Promise<void | false> {
27 observe(directoryListingFileIcon, linkifyIcon, {signal});

Callers

nothing calls this directly

Calls 2

wrapFunction · 0.85
assignMethod · 0.80

Tested by

no test coverage detected