aboutsummaryrefslogtreecommitdiff
path: root/extension/src/features/nip07allow-api.ts
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-01-28 19:56:02 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2024-01-28 19:56:02 -0500
commit87645bfad3943e1110e4cb2e038124083e8ae793 (patch)
treec327a4437c98d973f45c313cf8259ad75515c4fe /extension/src/features/nip07allow-api.ts
parentc438ee90e3be4e5e01ae3d045d6b841a03bd46eb (diff)
progress update
Diffstat (limited to 'extension/src/features/nip07allow-api.ts')
-rw-r--r--extension/src/features/nip07allow-api.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/extension/src/features/nip07allow-api.ts b/extension/src/features/nip07allow-api.ts
index 4787437..89639d1 100644
--- a/extension/src/features/nip07allow-api.ts
+++ b/extension/src/features/nip07allow-api.ts
@@ -20,7 +20,7 @@ import { BgRuntime, FeatureApi, IFeatureExport, exportForegroundApi, popupAndOpt
import { AppSettings } from "./settings";
import { set, get, toRefs } from "@vueuse/core";
import { computed, shallowRef } from "vue";
-import { waitForChangeFn } from "./util";
+import { waitForChangeFn, push, remove } from "./util";
interface AllowedSites{
origins: string[];
@@ -99,7 +99,7 @@ export const useInjectAllowList = (): IFeatureExport<AppSettings, InjectAllowlis
//See if origin is already in the list
if (!includes(origins.value, originOnly)) {
//Add to the list
- origins.value.push(originOnly);
+ push(origins, originOnly);
//If current tab was added, reload the tab
if (!origin) {
@@ -117,10 +117,9 @@ export const useInjectAllowList = (): IFeatureExport<AppSettings, InjectAllowlis
//Get origin part of url
const delOriginOnly = new URL(delOrigin).origin
- const allowList = get(origins)
//Remove the origin
- origins.value = filter(allowList, (o) => !isEqual(o, delOriginOnly));
+ remove(origins, delOriginOnly)
//If current tab was removed, reload the tab
if (!origin) {