File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515 isUsingApiKey ,
1616} from '../config/index.mjs'
1717import { isSafari } from '../utils/is-safari'
18+ import { isFirefox } from '../utils/is-firefox'
1819
1920const KEY_ACCESS_TOKEN = 'accessToken'
2021const cache = new ExpiryMap ( 10 * 1000 )
@@ -112,7 +113,7 @@ Browser.contextMenus.removeAll().then(() => {
112113 id : menuId + 'new' ,
113114 parentId : menuId ,
114115 title : 'New Chat' ,
115- contexts : [ 'selection' ] ,
116+ contexts : [ isFirefox ( ) ? 'all' : 'selection' ] ,
116117 } )
117118 for ( const index in defaultConfig . selectionTools ) {
118119 const key = defaultConfig . selectionTools [ index ]
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export * from './fetch-sse'
55export * from './get-conversation-pairs'
66export * from './get-possible-element-by-query-selector'
77export * from './init-session'
8+ export * from './is-firefox.mjs'
89export * from './is-mobile'
910export * from './is-safari'
1011export * 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