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

Function onAltClick

source/features/batch-mark-files-as-viewed.tsx:72–82  ·  view source on GitHub ↗
(event: DelegateEvent<MouseEvent, HTMLElement>)

Source from the content-addressed store, hash-verified

70const markAsViewed = clickAll(markAsViewedSelector);
71
72function onAltClick(event: DelegateEvent<MouseEvent, HTMLElement>): void {
73 const file = closestElement(fileSelector, event.delegateTarget);
74 const newState = isChecked(file) ? 'viewed' : 'unviewed';
75
76 void showToast(async () => {
77 markAsViewed(event);
78 }, {
79 message: `Marking visible files as ${newState}`,
80 doneMessage: `Files marked as ${newState}`,
81 });
82}
83
84function handleClick(event: DelegateEvent<MouseEvent, HTMLElement>): void {
85 if (!event.isTrusted) {

Callers 1

handleClickFunction · 0.85

Calls 2

isCheckedFunction · 0.85
showToastFunction · 0.85

Tested by

no test coverage detected