function refreshSettings(){
	if(useChromeStorage()){
		chrome.storage.sync.get(S4T_ALL_SETTINGS, function(result){
			//if(chrome.runtime.lastError){}
			$.each(S4T_ALL_SETTINGS, function(i, settingName){
				if(result[settingName]){
					S4T_SETTINGS[settingName] = result[settingName];
				} else {
					S4T_SETTINGS[settingName] = S4T_SETTING_DEFAULTS[settingName];
				}
			});
			onSettingsUpdated();
		});
	} else {
		// Get the settings (with defaults for each). Add a new line here for every new setting.
		$.each(S4T_ALL_SETTINGS, function(i, settingName){
			S4T_SETTINGS[settingName] = getSetting(settingName, S4T_SETTING_DEFAULTS[settingName]);
		});
		onSettingsUpdated();
	}
}
/**
 * Refreshes all of the persisted settings and puts them in memory. This is
 * done at the beginning, and any time chrome cloud-storage sends an event
 * that the data has changed.
 */
Refreshes all of the persisted settings and puts them in memory. This is
done at the beginning, and any time chrome cloud-storage sends an event
that the data has changed.
Refreshes all of the persisted settings and puts them in memory . This is done at the beginning and any time chrome cloud - storage sends an event that the data has changed .
function refreshSettings(){
	if(useChromeStorage()){
		chrome.storage.sync.get(S4T_ALL_SETTINGS, function(result){
			$.each(S4T_ALL_SETTINGS, function(i, settingName){
				if(result[settingName]){
					S4T_SETTINGS[settingName] = result[settingName];
				} else {
					S4T_SETTINGS[settingName] = S4T_SETTING_DEFAULTS[settingName];
				}
			});
			onSettingsUpdated();
		});
	} else {
		$.each(S4T_ALL_SETTINGS, function(i, settingName){
			S4T_SETTINGS[settingName] = getSetting(settingName, S4T_SETTING_DEFAULTS[settingName]);
		});
		onSettingsUpdated();
	}
}
function refreshSettings ( ) { if ( useChromeStorage ( ) ) { chrome . storage . sync . get ( S4T_ALL_SETTINGS , function ( result ) { $ . each ( S4T_ALL_SETTINGS , function ( i , settingName ) { if ( result [ settingName ] ) { S4T_SETTINGS [ settingName ] = result [ settingName ] ; } else { S4T_SETTINGS [ settingName ] = S4T_SETTING_DEFAULTS [ settingName ] ; } } ) ; onSettingsUpdated ( ) ; } ) ; } else { $ . each ( S4T_ALL_SETTINGS , function ( i , settingName ) { S4T_SETTINGS [ settingName ] = getSetting ( settingName , S4T_SETTING_DEFAULTS [ settingName ] ) ; } ) ; onSettingsUpdated ( ) ; } }
Refreshes all of the persisted settings and puts them in memory.
Refreshes all of the persisted settings and puts them in memory .
//if(chrome.runtime.lastError){} // Get the settings (with defaults for each). Add a new line here for every new setting.