A fast, local-first "redirection engine" for !bang users with a few extra features ^-^

chore: fix types

Changed files
+14 -2
src
+14 -2
src/main.ts
···
DOWN: ["(↓°□°)↓", "(´◕‿◕)↓", "↓(´・ω・)↓"],
},
};
-
const customBangs = JSON.parse(localStorage.getItem("custom-bangs") || "{}");
+
const customBangs: {
+
[key: string]: {
+
c?: string;
+
d: string;
+
r: number;
+
s: string;
+
sc?: string;
+
t: string;
+
u: string;
+
};
+
} = JSON.parse(localStorage.getItem("custom-bangs") || "{}");
function getFocusableElements(
root: HTMLElement = document.body,
···
s: shortcut,
u: searchUrl,
d: baseUrl,
+
r: 0,
};
storage.set(
CONSTANTS.LOCAL_STORAGE_KEYS.CUSTOM_BANGS,
···
validatedElements.removeBangs.forEach((button) => {
button.addEventListener("click", (event) => {
-
const shortcut = (event.target as HTMLButtonElement).dataset.shortcut;
+
const shortcut = (event.target as HTMLButtonElement).dataset
+
.shortcut as string;
delete customBangs[shortcut];
storage.set(
CONSTANTS.LOCAL_STORAGE_KEYS.CUSTOM_BANGS,