env.ts
1 const forbiddenProtocols = [ 2 'chrome-extension://', 3 'chrome-search://', 4 'chrome://', 5 'devtools://', 6 'edge://', 7 'https://chrome.google.com/webstore', 8 ] 9 10 export function isForbiddenUrl(url: string): boolean { 11 return forbiddenProtocols.some(protocol => url.startsWith(protocol)) 12 } 13 14 export const isFirefox = navigator.userAgent.includes('Firefox')