Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
chrome.storage save only changed data

I'm developing a Chrome extension and I'm both saving and restoring data with chrome.storage.

Since there is more than one data, every time I need to save data, I re-save all the data. How do I get the data needed to be saved instead?

How do I need to update the function?

function setStorage() {
    chrome.storage.sync.set({"theme_color": $id("input_theme_color").value}, function() {
    });
    chrome.storage.local.set({"history_content": historyContent}, function() {
    });
    chrome.storage.sync.set({"settings_update": lastSettingsUpdate}, function() {
    });
    chrome.storage.local.set({"last_history_clear": lastHistoryClear}, function() {
    });
    chrome.storage.local.set({"total_history_content": totalHistoryContent}, function() {
    });
    chrome.storage.local.set({"last_music": lastMusic}, function() {
    });
}
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!