Example #1
0
	var saveSettings = function() {
	    // Storing setting in the local storage of mozilla and chorme
		localStorage.setItem('tagSpacesSettings', JSON.stringify(exports.Settings));
	    
	    // Storing settings in firefox native preferences
	    if(isFirefox) {
	        TSCORE.IO.saveSettings(JSON.stringify(exports.Settings));
		}
		
		console.log('Tagspace Settings Saved!');
	};
Example #2
0
 // Save setting
 function saveSettings() {
   // TODO Make a file based json backup
   // Making a backup of the last settings
   localStorage.setItem('tagSpacesSettingsBackup1', localStorage.getItem('tagSpacesSettings'));
   // Storing setting in the local storage of mozilla and chorme
   localStorage.setItem('tagSpacesSettings', JSON.stringify(exports.Settings));
   // Storing settings in firefox native preferences
   if (isFirefox || isChrome || isCordova) {
     TSCORE.IO.saveSettings(JSON.stringify(exports.Settings));
     if (isCordova) {
       TSCORE.IO.saveSettingsTags(JSON.stringify(exports.Settings.tagGroups));
     }
   }
   console.log('Tagspace Settings Saved!');
 }