this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add 'x' for expanding content warning

+22 -1
+7 -1
src/components/keyboard-shortcuts-help.jsx
··· 94 94 ), 95 95 }, 96 96 { 97 - action: 'Toggle expanded/collapsed thread', 97 + action: ( 98 + <> 99 + Expand content warning or 100 + <br /> 101 + toggle expanded/collapsed thread 102 + </> 103 + ), 98 104 keys: <kbd>x</kbd>, 99 105 }, 100 106 {
+15
src/components/status.jsx
··· 1021 1021 enabled: hotkeysEnabled && canBoost, 1022 1022 }, 1023 1023 ); 1024 + const xRef = useHotkeys('x', (e) => { 1025 + const activeStatus = document.activeElement.closest( 1026 + '.status-link, .status-focus', 1027 + ); 1028 + if (activeStatus) { 1029 + const spoilerButton = activeStatus.querySelector( 1030 + 'button.spoiler:not(.spoiling)', 1031 + ); 1032 + if (spoilerButton) { 1033 + e.stopPropagation(); 1034 + spoilerButton.click(); 1035 + } 1036 + } 1037 + }); 1024 1038 1025 1039 const displayedMediaAttachments = mediaAttachments.slice( 1026 1040 0, ··· 1169 1183 fRef.current = nodeRef; 1170 1184 dRef.current = nodeRef; 1171 1185 bRef.current = nodeRef; 1186 + xRef.current = nodeRef; 1172 1187 }} 1173 1188 tabindex="-1" 1174 1189 class={`status ${