fallback to ctrl+click simulation if extension is not installed (#1074 #1075)

This commit is contained in:
Athou
2023-06-14 01:02:00 +02:00
parent 8abb2770ec
commit 18f68aab31
32 changed files with 59 additions and 47 deletions

View File

@@ -33,7 +33,7 @@ export function FeedEntries() {
const scrollMarks = useAppSelector(state => state.user.settings?.scrollMarks)
const scrollingToEntry = useAppSelector(state => state.entries.scrollingToEntry)
const dispatch = useAppDispatch()
const { isBrowserExtensionInstalled, openLinkInBackgroundTab } = useBrowserExtension()
const { openLinkInBackgroundTab } = useBrowserExtension()
const selectedEntry = entries.find(e => e.id === selectedEntryId)
@@ -212,7 +212,6 @@ export function FeedEntries() {
window.open(selectedEntry.url, "_blank", "noreferrer")
})
useMousetrap("b", () => {
if (!isBrowserExtensionInstalled) return
if (!selectedEntry) return
openLinkInBackgroundTab(selectedEntry.url)
})