// Function to trigger the download of the JSON file function saveDataToFile(data, filename) { let jsonStr = JSON.stringify(data, null, 2); // Convert data array to JSON string let blob = new Blob([jsonStr], { type: "application/json" }); // Create a link element to trigger the download let url = URL.createObjectURL(blob); let a = document.createElement("a"); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); // Clean up the object URL } chrome.storage.local.get('@@vwe-persistence', (data) => { saveDataToFile(data['@@vwe-persistence'], 'tab-manager'); })