Files
extension/src/utils/extension.ts

12 lines
254 B
TypeScript

export const isChrome = () => {
return chrome.runtime.getURL('').startsWith('chrome-extension://');
};
export const isFirefox = () => {
try {
return browser.runtime.getURL('').startsWith('moz-extension://');
} catch {
return false;
}
};