add firstPartyDomain for first-party isolation

This commit is contained in:
Jorrin
2024-03-03 20:14:56 +01:00
parent d74f0abbf6
commit e7ca90b75f
2 changed files with 12 additions and 0 deletions

View File

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