-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
74 changed files
with
2,327 additions
and
1,832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ dist | |
pnpm-lock.yaml | ||
Dockerfile | ||
*.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { StorageIds, StorageKeys } from "./type"; | ||
|
||
export interface StorageTool { | ||
id: StorageIds; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
set(key: StorageKeys, value: any): Promise<void>; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
getBool(key: StorageKeys): Promise<boolean | undefined>; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
get(key: StorageKeys): Promise<any>; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
toggle(key: StorageKeys): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { StorageTool } from ".."; | ||
import { StorageIds } from "./type"; | ||
|
||
export class TestStorage implements StorageTool { | ||
id: StorageIds; | ||
constructor(id: StorageIds) { | ||
this.id = id; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
async set(key: string, value: any) { | ||
console.log(`Set ${key} to ${value}`); | ||
} | ||
|
||
async getBool(key: string) { | ||
console.log(`Get ${key}`); | ||
return true; | ||
} | ||
|
||
async get(key: string) { | ||
console.log(`Get ${key}`); | ||
return true; | ||
} | ||
|
||
async toggle(key: string) { | ||
console.log(`Toggle ${key}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { WebsiteIds } from "@/data/websites"; | ||
|
||
export type StorageKeys = | ||
| "dark" | ||
| "rainbow" | ||
| "enabled-hidden" | ||
| "show-hidden-option" | ||
| "installed" | ||
| "auto-2fa" | ||
| "quick-switch"; | ||
export type StorageIds = WebsiteIds | "other"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export default function isTrue(value: any) { | ||
if (value === undefined) return undefined; | ||
|
||
let str: string; | ||
|
||
if (typeof value === "boolean") { | ||
str = value.toString(); | ||
} else if (typeof value === "string") { | ||
str = value.toLowerCase(); | ||
} else { | ||
str = value; | ||
} | ||
return str === "true"; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Browser from "webextension-polyfill"; | ||
|
||
export const disablePopup = () => { | ||
//Browser.browserAction.setPopup({ popup: "" }); | ||
//console.log("disablePopup"); | ||
Browser.action.setPopup({ popup: "" }); | ||
}; | ||
|
||
export const enablePopup = () => { | ||
//Browser.browserAction.setPopup({ popup: "popup.html" }); | ||
Browser.action.setPopup({ popup: "popup.html" }); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.