function saveOptions () {
chrome.storage.local.set({
- prefs_backup_timer: getSelectValue("prefsSelectBackupPeriod"),
- prefs_max_backup_items: getSelectValue("prefsSelectMaxBackups"),
+ prefs_backup_timer: parseInt(getSelectValue("prefsSelectBackupPeriod")),
+ prefs_max_backup_items: parseInt(getSelectValue("prefsSelectMaxBackups")),
prefs_theme: document.getElementById('prefsTheme').value,
});
// Re-initialize the backup alarm
- chrome.runtime.getBackgroundPage((bg) => bg.initAlarm());
+ chrome.runtime.sendMessage({action: 'initAlarm'});
// Update status to let user know options were saved.
var status = document.getElementById("statusDiv");