Add functions to bypass websites that are redirected to (looking at you voe)

This commit is contained in:
2022-07-13 00:45:52 +02:00
parent 672b920f31
commit 4cf76eb62a
9 changed files with 68 additions and 89 deletions

View File

@ -1,6 +1,6 @@
import {Match, matches} from "../match/match";
import {Match, matches} from "../match/matches";
async function storageGet(key: string): Promise<any> {
export async function storageGet(key: string): Promise<any> {
return new Promise((resolve) => {
chrome.storage.local.get(key, (value) => {
resolve(value[key])
@ -8,12 +8,16 @@ async function storageGet(key: string): Promise<any> {
})
}
async function storageSet(key: string, value: any) {
export async function storageSet(key: string, value: any) {
const obj = {}
obj[key] = value
await chrome.storage.local.set(obj)
}
export async function storageDelete(key: string) {
await chrome.storage.local.remove(key)
}
export async function getDisabled(): Promise<Match[]> {
const localMatches = []