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

Function unhide

source/features/hide-low-quality-comments.tsx:14–28  ·  view source on GitHub ↗
(event: DelegateEvent)

Source from the content-addressed store, hash-verified

12export const singleParagraphCommentSelector = '.comment-body > p:only-child';
13
14async function unhide(event: DelegateEvent): Promise<void> {
15 for (const comment of $$('.rgh-hidden-comment')) {
16 comment.hidden = false;
17 }
18
19 await delay(10); // "Similar comments" aren't expanded without this in Safari #3830
20
21 // Expand all "similar comments" boxes
22 for (const similarCommentsExpandButton of $$('.rgh-hidden-comment > summary')) {
23 similarCommentsExpandButton.click();
24 }
25
26 $('.rgh-hidden-comment').scrollIntoView();
27 event.delegateTarget.parentElement!.remove();
28}
29
30function hideComment(comment: HTMLElement): void {
31 comment.hidden = true;

Callers

nothing calls this directly

Calls 2

delayFunction · 0.85
removeMethod · 0.80

Tested by

no test coverage detected