Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

432 B
Raw Blame
const STORAGE_KEY = "libreget_open_app_on_download";

let openApp = true;

export async function loadOpenAppState() {
  const result = await chrome.storage.local.get(STORAGE_KEY);
  openApp = result[STORAGE_KEY] !== false;
  return openApp;
}

export function isOpenAppEnabled() {
  return openApp;
}

export async function setOpenAppEnabled(value) {
  openApp = value;
  await chrome.storage.local.set({ [STORAGE_KEY]: value });
}