rem:  var notify = $('qa-prefs-notify').childNodes; var prefs = ''; for (var i=0; i<notify.length; i++) { if (notify[i].setChecked != null && (notify[i].checked == true || notify[i].checked == false)) { if (notify[i].checked == false) prefs += '0,'; else prefs += '1,'; } } prefs = prefs.substring(0, prefs.length-1); qaPref.setPref(qaPref.prefBase+'.notificationSettings', prefs, 'char');   var uname = document.getElementById('qa-preferences-litmus-username').value; var passwd = document.getElementById('qa-preferences-litmus-password').value;   if (uname == qaPref.litmus.getUsername() && passwd == qaPref.litmus.getPassword()) return; var callback = function(resp) { if (resp.responseText == 0) { alert(document.getElementById("bundle_qa"). getString("qa.extension.prefs.loginError"));  $('qa_tabrow').selectedItem = $('qa-tabbar-prefs'); return false; } else { qaPref.litmus.setPassword(uname, passwd); return true; } } litmus.validateLogin(uname, passwd, callback); return false; }, 
add:  var notify = $('qa-prefs-notify').childNodes; var prefs = ''; for (var i=0; i<notify.length; i++) { if (notify[i].setChecked != null && (notify[i].checked == true || notify[i].checked == false)) { if (notify[i].checked == false) prefs += '0,'; else prefs += '1,'; } } prefs = prefs.substring(0, prefs.length-1); qaPref.setPref(qaPref.prefBase+'.notificationSettings', prefs, 'char');   var uname = document.getElementById('qa-preferences-litmus-username').value; var passwd = document.getElementById('qa-preferences-litmus-password').value;   if (uname == qaPref.litmus.getUsername() && passwd == qaPref.litmus.getPassword()) return; var callback = function(resp) { if (resp.responseText == 0) { alert(document.getElementById("bundle_qa"). getString("qa.extension.prefs.loginError"));  $('qa_tabrow').selectedItem = $('qa-tabbar-prefs'); return false; } else { qaPref.litmus.setPassword(uname, passwd); return true; } } litmus.validateLogin(uname, passwd, callback); return false; }, 
context: 	savePrefsWindow : function() {		// save notification settings		var notify = $('qa-prefs-notify').childNodes;		var prefs = '';		for (var i=0; i<notify.length; i++) {			if (notify[i].setChecked != null && (notify[i].checked == true 				  || notify[i].checked == false)) { // it's a checkbox				if (notify[i].checked == false)					prefs += '0,';				else 					prefs += '1,';			}		}		prefs = prefs.substring(0, prefs.length-1); // remove the trailing comma		qaPref.setPref(qaPref.prefBase+'.notificationSettings', prefs, 'char');				// save litmus account settings		var uname = document.getElementById('qa-preferences-litmus-username').value;		var passwd = document.getElementById('qa-preferences-litmus-password').value;				// if uname and passwd are unchanged, we're done:		if (uname == qaPref.litmus.getUsername() && 				passwd == qaPref.litmus.getPassword()) 			return;		var callback = function(resp) {			if (resp.responseText == 0) {				alert(document.getElementById("bundle_qa").					getString("qa.extension.prefs.loginError"));				// snap the tab selection back to prefs:				$('qa_tabrow').selectedItem = $('qa-tabbar-prefs');				return false;			} else {				qaPref.litmus.setPassword(uname, passwd);				return true;			}		}		litmus.validateLogin(uname, passwd, callback);		return false; // not ready to close yet	},
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/838a3f38df6e9bd6fd899d9909b263e01aed1e26/settings.js/buggy/testing/extensions/community/chrome/content/settings.js