this repo has no description
0
fork

Configure Feed

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

Allow shifts to open composer in new window

+12 -4
-1
src/components/compose-button.jsx
··· 11 11 const newWin = openCompose(); 12 12 13 13 if (!newWin) { 14 - alert('Looks like your browser is blocking popups.'); 15 14 states.showCompose = true; 16 15 } 17 16 } else {
-1
src/components/compose.jsx
··· 607 607 }); 608 608 609 609 if (!newWin) { 610 - alert('Looks like your browser is blocking popups.'); 611 610 return; 612 611 } 613 612
+10 -2
src/components/status.jsx
··· 44 44 import isMastodonLinkMaybe from '../utils/isMastodonLinkMaybe'; 45 45 import localeMatch from '../utils/locale-match'; 46 46 import niceDateTime from '../utils/nice-date-time'; 47 + import openCompose from '../utils/open-compose'; 47 48 import pmem from '../utils/pmem'; 48 49 import safeBoundingBoxPadding from '../utils/safe-bounding-box-padding'; 49 50 import shortenNumber from '../utils/shorten-number'; ··· 373 374 canBoost = true; 374 375 } 375 376 376 - const replyStatus = () => { 377 + const replyStatus = (e) => { 377 378 if (!sameInstance || !authenticated) { 378 379 return alert(unauthInteractionErrorMessage); 380 + } 381 + // syntheticEvent comes from MenuItem 382 + if (e?.shiftKey || e?.syntheticEvent?.shiftKey) { 383 + const newWin = openCompose({ 384 + replyToStatus: status, 385 + }); 386 + if (newWin) return; 379 387 } 380 388 states.showCompose = { 381 389 replyToStatus: status, ··· 855 863 ); 856 864 857 865 const hotkeysEnabled = !readOnly && !previewMode; 858 - const rRef = useHotkeys('r', replyStatus, { 866 + const rRef = useHotkeys('r, shift+r', replyStatus, { 859 867 enabled: hotkeysEnabled, 860 868 }); 861 869 const fRef = useHotkeys(
+2
src/utils/open-compose.js
··· 18 18 // } 19 19 20 20 newWin.__COMPOSE__ = opts; 21 + } else { 22 + alert('Looks like your browser is blocking popups.'); 21 23 } 22 24 23 25 return newWin;