mirror of
https://github.com/sussy-code/browser-ext.git
synced 2026-08-04 02:05:57 +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;
|
|
}
|
|
};
|