File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
15
15
isUsingApiKey ,
16
16
} from '../config/index.mjs'
17
17
import { isSafari } from '../utils/is-safari'
18
+ import { isFirefox } from '../utils/is-firefox'
18
19
19
20
const KEY_ACCESS_TOKEN = 'accessToken'
20
21
const cache = new ExpiryMap ( 10 * 1000 )
@@ -112,7 +113,7 @@ Browser.contextMenus.removeAll().then(() => {
112
113
id : menuId + 'new' ,
113
114
parentId : menuId ,
114
115
title : 'New Chat' ,
115
- contexts : [ 'selection' ] ,
116
+ contexts : [ isFirefox ( ) ? 'all' : 'selection' ] ,
116
117
} )
117
118
for ( const index in defaultConfig . selectionTools ) {
118
119
const key = defaultConfig . selectionTools [ index ]
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export * from './fetch-sse'
5
5
export * from './get-conversation-pairs'
6
6
export * from './get-possible-element-by-query-selector'
7
7
export * from './init-session'
8
+ export * from './is-firefox.mjs'
8
9
export * from './is-mobile'
9
10
export * from './is-safari'
10
11
export * from './limited-fetch'
Original file line number Diff line number Diff line change
1
+ export function isFirefox ( ) {
2
+ return navigator . userAgent . includes ( 'Firefox' )
3
+ }
You can’t perform that action at this time.
0 commit comments