using my boilerplate yuh

This commit is contained in:
Sriram Hariharan
2023-02-22 22:51:38 -06:00
parent 21d7056aae
commit bce2717088
91 changed files with 32400 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { createStore } from 'chrome-extension-toolkit';
/**
* A store that is used to store data that is only relevant during development
*/
interface IDevStore {
/** the tabId for the debug tab */
debugTabId?: number;
/** whether the debug tab is visible */
wasDebugTabVisible?: boolean;
/** whether we should enable extension reloading */
isExtensionReloading?: boolean;
/** whether we should enable tab reloading */
isTabReloading?: boolean;
/** The id of the tab that we want to reload (after the extension reloads itself ) */
reloadTabId?: number;
}
export const devStore = createStore<IDevStore>('DEV_STORE', {
debugTabId: undefined,
isTabReloading: true,
wasDebugTabVisible: false,
isExtensionReloading: true,
reloadTabId: undefined,
});

View File

@@ -0,0 +1,15 @@
import { createStore, Store } from 'chrome-extension-toolkit';
interface ISessionStore {
chromeSessionId?: string;
}
export const sessionStore = createStore<ISessionStore>(
'SESSION_STORE',
{
chromeSessionId: undefined,
},
{
area: 'session',
}
);