Skip to content

Instantly share code, notes, and snippets.

View sergiitk's full-sized avatar
🚀
Back to work

Sergii Tkachenko sergiitk

🚀
Back to work
View GitHub Profile
@sergiitk
sergiitk / local-storage-get.js
Last active January 20, 2025 20:08
ext-export-import
// run in chrome -> sources -> snippets at
// chrome-extension://[extension-id]/window.html
async function storageGet(storageType, space = 2) {
let storage_fn;
if (storageType === 'local') {
storage_fn = chrome.storage.local;
} else if (storageType === 'sync') {
storage_fn = chrome.storage.sync;
} else {