Files
SuperCharged-Claude-Code-Up…/dev-browser/extension/services/StateManager.ts
admin 07242683bf Add 260+ Claude Code skills from skills.sh
Complete collection of AI agent skills including:
- Frontend Development (Vue, React, Next.js, Three.js)
- Backend Development (NestJS, FastAPI, Node.js)
- Mobile Development (React Native, Expo)
- Testing (E2E, frontend, webapp)
- DevOps (GitHub Actions, CI/CD)
- Marketing (SEO, copywriting, analytics)
- Security (binary analysis, vulnerability scanning)
- And many more...

Synchronized from: https://skills.sh/

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 18:02:28 +00:00

29 lines
708 B
TypeScript

/**
* StateManager - Manages extension active/inactive state with persistence.
*/
const STORAGE_KEY = "devBrowserActiveState";
export interface ExtensionState {
isActive: boolean;
}
export class StateManager {
/**
* Get the current extension state.
* Defaults to inactive if no state is stored.
*/
async getState(): Promise<ExtensionState> {
const result = await chrome.storage.local.get(STORAGE_KEY);
const state = result[STORAGE_KEY] as ExtensionState | undefined;
return state ?? { isActive: false };
}
/**
* Set the extension state.
*/
async setState(state: ExtensionState): Promise<void> {
await chrome.storage.local.set({ [STORAGE_KEY]: state });
}
}