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

Function markForked

source/features/repo-header-info.tsx:94–110  ·  view source on GitHub ↗
(repoLink: HTMLElement, forked?: {url: string})

Source from the content-addressed store, hash-verified

92}
93
94function markForked(repoLink: HTMLElement, forked?: {url: string}): void {
95 if (!forked) {
96 return;
97 }
98
99 prepareForAddition(repoLink);
100 // Only show the clickable button at larger resolutions. Default to the native one on smaller screens
101 $('.octicon-repo-forked', repoLink).classList.add('d-sm-none');
102 repoLink.after(
103 <a
104 href={forked.url}
105 className="d-none d-sm-flex flex-items-center flex-justify-center p-1 tmp-p-1 Button Button--invisible"
106 >
107 <RepoForkedIcon className='m-0 tmp-m-0' width={12} height={12} />
108 </a>,
109 );
110}
111
112function addCiStatus(anchor: HTMLElement, ciCommit: string | undefined): void {
113 if (!ciCommit) {

Callers 1

addFunction · 0.85

Calls 1

prepareForAdditionFunction · 0.85

Tested by

no test coverage detected