async function saveSettings(settings) {
    var response = await chrome.runtime.sendMessage({
        action: "saveSettings",
        settings: settings,
    });
    if (response.status != "ok") {
        throw new Error(response.message);
    }

    // reload settings
    return await getSettings();
}
Save settings

@since 3.0.0

@param object settings Settings object
@return object Settings object