mirror of
https://github.com/sussy-code/browser-ext.git
synced 2026-01-11 20:10:17 +00:00
11 lines
254 B
TypeScript
11 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;
|
|
}
|
|
};
|