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

Function dropExtraCopy

source/features/show-names.tsx:15–22  ·  view source on GitHub ↗
(link: HTMLAnchorElement)

Source from the content-addressed store, hash-verified

13import observe from '../helpers/selector-observer.js';
14
15async function dropExtraCopy(link: HTMLAnchorElement): Promise<void> {
16 // Drop 'commented' label to shorten the copy
17 const commentedNode = link.parentNode!.nextSibling;
18 if (closestElementOptional('.timeline-comment-header', link) && commentedNode) {
19 // "left a comment" appears in the main comment of reviews
20 removeTextNodeContaining(commentedNode, /commented|left a comment/);
21 }
22}
23
24function createElement(element: HTMLAnchorElement, fullName: string): JSX.Element {
25 const nameElement = (

Callers 1

updateDomFunction · 0.85

Calls 1

removeTextNodeContainingFunction · 0.85

Tested by

no test coverage detected