rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
if (-1 == this.MAX_CONNECT_ATTEMPTS) this.display (getMsg(MSG_CONNECTION_ATTEMPT_UNLIMITED, [this.getURL(), e.server.getURL(), e.connectAttempt, e.reconnectDelayMs / 1000]), "INFO"); else this.display (getMsg(MSG_CONNECTION_ATTEMPT, [this.getURL(), e.server.getURL(), e.connectAttempt, this.MAX_CONNECT_ATTEMPTS]), "INFO...
this.display(getMsg(MSG_CONNECTION_ATTEMPT, [this.getURL(), e.server.getURL()]), "INFO");
function my_sconnect (e){ this.busy = true; updateProgress(); if ("_firstNick" in this) delete this._firstNick; if (-1 == this.MAX_CONNECT_ATTEMPTS) this.display (getMsg(MSG_CONNECTION_ATTEMPT_UNLIMITED, [this.getURL(), e.server.getURL()...
str = e.params.slice(1).join (" ");
case "005": str = e.params.slice(3).join (" ");
function my_showtonet (e){ var p = (2 in e.params) ? e.params[2] + " " : ""; var str = ""; switch (e.code) { case "004": str = e.params.slice(1).join (" "); break; case "001": updateTitle(this); updateNetwork (this); if (client.currentObje...
display(getMsg(MSG_USER_MODE, [e.user.unicodeName, e.params[2]]), MT_MODE);
this.display(getMsg(MSG_USER_MODE, [e.user.unicodeName, e.params[2]]), MT_MODE);
function my_umode (e){ if ("user" in e && e.user) { e.user.updateHeader(); display(getMsg(MSG_USER_MODE, [e.user.unicodeName, e.params[2]]), MT_MODE); } else { display(getMsg(MSG_USER_MODE, [e.params[1], e.params[2]]), MT_MODE); }}
display(getMsg(MSG_USER_MODE, [e.params[1], e.params[2]]), MT_MODE);
this.display(getMsg(MSG_USER_MODE, [e.params[1], e.params[2]]), MT_MODE);
function my_umode (e){ if ("user" in e && e.user) { e.user.updateHeader(); display(getMsg(MSG_USER_MODE, [e.user.unicodeName, e.params[2]]), MT_MODE); } else { display(getMsg(MSG_USER_MODE, [e.params[1], e.params[2]]), MT_MODE); }}
updateTitle (e.channel);
updateTitle();
function my_unick (e){ if (userIsMe(e.user)) { updateNetwork(); updateTitle (e.channel); } }
this.display(msg);
function my_unknown (e){ if ("pendingWhoisLines" in e.server) { /* whois lines always have the nick in param 2 */ e.user = new CIRCUser(e.server, null, e.params[2]); e.destMethod = "onUnknownWhois"; e.destObject = this; return; } e.params.shift(); /* remove the code */ ...
} if (((e.code == 471) || (e.code == 473) || (e.code == 475)) && ("knock" in e.server.servCmds)) { var args = [msg, e.channel.unicodeName, "knock " + e.channel.unicodeName]; msg = getMsg("msg.err.irc." + e.code + ".knock", args, ""); client.munger.entries[".inline-buttons"].enabled = true; this.display(msg); client.m...
function my_unknown (e){ if ("pendingWhoisLines" in e.server) { /* whois lines always have the nick in param 2 */ e.user = new CIRCUser(e.server, null, e.params[2]); e.destMethod = "onUnknownWhois"; e.destObject = this; return; } e.params.shift(); /* remove the code */ ...
if (this.whoisList && (lowerNick in this.whoisList) && !this.whoisList[lowerNick]) { delete this.whoisList[lowerNick]; this.primServ.whowas(nick, 1); return; } delete this.whoisList[lowerNick];
function my_whoisreply (e){ var text = "egads!"; var nick = e.params[2]; var user; if (e.user) { user = e.user; nick = user.unicodeName; } switch (Number(e.code)) { case 311: // Clear saved away message so it appears and can be reset. if (e.user) ...
function myblur() { if (_installCountdownInterval != -1) { clearInterval(_installCountdownInterval); _installCountdownInterval = -1; }
function myblur() { if (_timeout) clearTimeout(_timeout); _timeout = setTimeout(setWidgetsAfterBlur, 0);
function myblur() { // When the dialog is blurred, we only get one blur event, targeted // a the currently focused XUL element. We cannot distinguish between // an internal focus change and a window change. Stop the countdown, but // don't disable. if (_installCountdownInterval != -1) { clearInte...
function myblur() { if (_installCountdownInterval != -1)
function myblur() { if (_installCountdownInterval != -1) {
function myblur() { if (_installCountdownInterval != -1) clearInterval(_installCountdownInterval); _installCountdown = 2; okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown.toFixed(1)]); okButton.disabled = true; }
_installCountdown = 2; okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown.toFixed(1)]); okButton.disabled = true;
_installCountdownInterval = -1; }
function myblur() { if (_installCountdownInterval != -1) clearInterval(_installCountdownInterval); _installCountdown = 2; okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown.toFixed(1)]); okButton.disabled = true; }
function myfocus(event) { if (_installCountdownInterval == -1) _installCountdownInterval = setInterval(okButtonCountdown, 100);
function myfocus() { if (_timeout) clearTimeout(_timeout);
function myfocus(event) { if (_installCountdownInterval == -1) _installCountdownInterval = setInterval(okButtonCountdown, 100); // When the dialog is focused, we get *three* focus events, two targeted // at the document itself and one at the internal XUL element. Only reset // the counter if the docu...
if (event.target == document) { _installCountdown = 2; okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown.toFixed(1)]); okButton.disabled = true; }
_timeout = setTimeout(setWidgetsAfterFocus, 0);
function myfocus(event) { if (_installCountdownInterval == -1) _installCountdownInterval = setInterval(okButtonCountdown, 100); // When the dialog is focused, we get *three* focus events, two targeted // at the document itself and one at the internal XUL element. Only reset // the counter if the docu...
function myfocus() {
function myfocus(event) {
function myfocus() { if (_installCountdownInterval == -1) _installCountdownInterval = setInterval(okButtonCountdown, 100); }
if (event.target == document) { _installCountdown = 2; okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown.toFixed(1)]); okButton.disabled = true; }
function myfocus() { if (_installCountdownInterval == -1) _installCountdownInterval = setInterval(okButtonCountdown, 100); }
return "127.0.0.1";
try { var ip = dnsResolve("localhost"); return ip; } catch (ex) { debug(ex); } return null;
function myIpAddress() { // call into IOService ... TODO return "127.0.0.1";}
return dns.resolve(dns.myHostName, false).getNextAddrAsString();
return dns.resolve(dns.myHostName, 0).getNextAddrAsString();
function myIpAddress() { try { return dns.resolve(dns.myHostName, false).getNextAddrAsString(); } catch (e) { return '127.0.0.1'; }}
this.prop1 = true; this.prop2 = false; this.prop3 = null this.prop4 = void 0; this.prop5 = "hi"; this.prop6 = 42; this.prop7 = new Date(); this.prop8 = Math.PI;
this.prop1 = true; this.prop2 = false; this.prop3 = null; this.prop4 = void 0; this.prop5 = "hi"; this.prop6 = 42; this.prop7 = new Date(); this.prop8 = Math.PI;
function MyObject() { this.prop1 = true; this.prop2 = false; this.prop3 = null this.prop4 = void 0; this.prop5 = "hi"; this.prop6 = 42; this.prop7 = new Date(); this.prop8 = Math.PI;}
promptService.Prompt(window, title, message, "", 0, oldValue, newValue)
promptService.prompt(window, title, message, "", 0, oldValue, newValue)
function myPrompt(message, oldValue, title) { /* * Can't simply call javascript's "prompt" because it puts up a checkbox (see bug 41390) * so we are using a local rewrite of prompt here. */// if bug 41390 gets fixed, use the following line and delete rest of routine// prompt(message, oldValue, title); /* use t...
var removedArray = []; var adjustedFirst = first; var adjustedLen = len;
removedArray.push(testArray[i]); }
function mySplice(testArray, splicedArray, first, len, elements) { var removedArray = []; var adjustedFirst = first; var adjustedLen = len; if (adjustedFirst < 0) adjustedFirst = testArray.length + first; if (adjustedFirst < 0) adjustedFirst = 0; if (adjustedLen < 0) adjustedLen = 0; for...
if (adjustedFirst < 0) adjustedFirst = testArray.length + first; if (adjustedFirst < 0) adjustedFirst = 0;
for (i = 0; i < elements.length; i++) splicedArray.push(elements[i]);
function mySplice(testArray, splicedArray, first, len, elements) { var removedArray = []; var adjustedFirst = first; var adjustedLen = len; if (adjustedFirst < 0) adjustedFirst = testArray.length + first; if (adjustedFirst < 0) adjustedFirst = 0; if (adjustedLen < 0) adjustedLen = 0; for...
if (adjustedLen < 0) adjustedLen = 0;
for (i = adjustedFirst + adjustedLen; i < testArray.length; i++) splicedArray.push(testArray[i]);
function mySplice(testArray, splicedArray, first, len, elements) { var removedArray = []; var adjustedFirst = first; var adjustedLen = len; if (adjustedFirst < 0) adjustedFirst = testArray.length + first; if (adjustedFirst < 0) adjustedFirst = 0; if (adjustedLen < 0) adjustedLen = 0; for...
for (i = 0; (i < adjustedFirst)&&(i < testArray.length); ++i) splicedArray.push(testArray[i]); if (adjustedFirst < testArray.length) for (i = adjustedFirst; (i < adjustedFirst + adjustedLen) && (i < testArray.length); ++i) { removedArray.push(testArray[i]); } for (i = 0; i < elements.length; i++) splicedArray.push(el...
return removedArray; }
function mySplice(testArray, splicedArray, first, len, elements) { var removedArray = []; var adjustedFirst = first; var adjustedLen = len; if (adjustedFirst < 0) adjustedFirst = testArray.length + first; if (adjustedFirst < 0) adjustedFirst = 0; if (adjustedLen < 0) adjustedLen = 0; for...
print("Is the provided argument to myTest() null? : " + msg);
writeLineToLog("Is the provided argument to myTest() null? : " + msg);
function myTest(x){ var obj = new Object(); var msg; with (obj) { msg = (x != null) ? "NO" : "YES"; print("Is the provided argument to myTest() null? : " + msg); try { throw "ZZZ"; } catch(e) { print("Caught thrown exception = " + e); } } return 1;}
print("Caught thrown exception = " + e);
writeLineToLog("Caught thrown exception = " + e);
function myTest(x){ var obj = new Object(); var msg; with (obj) { msg = (x != null) ? "NO" : "YES"; print("Is the provided argument to myTest() null? : " + msg); try { throw "ZZZ"; } catch(e) { print("Caught thrown exception = " + e); } } return 1;}
var savedsstone;
var savedmstone;
function needHomepageOverride(prefb) { var savedsstone; try { savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone"); } catch (e) { } if (savedmstone == "ignore") return false; var mstone = Components.classes["@mozilla.org/network/protocol;1?name=http"] .getServ...
try { try { } catch (a) { } finally { } } catch (b) { } finally { }
try { try { } catch (a) { } finally {
function Nested_1() { try { try { } catch (a) { } finally { } } catch (b) { } finally { } }
} catch (b) { } finally { } }
function Nested_1() { try { try { } catch (a) { } finally { } } catch (b) { } finally { } }
break inner; result1 = "fail: did break out of inner label"; } result2 = "pass"; break outer; print (i); } while ( i++ < 100 );
break inner; result1 = "fail: did break out of inner label"; } result2 = "pass"; break outer; writeLineToLog(i); } while ( i++ < 100 );
function NestedLabel() { i = 0; result1 = "pass"; result2 = "fail: did not hit code after inner loop"; result3 = "pass"; outer: { do { inner: {// print( i ); break inner; result1 = "fail: did break ...
testcases[tc++] = new TestCase( SECTION, "number of loop iterations", 0, i );
new TestCase( SECTION, "number of loop iterations", 0, i );
function NestedLabel() { i = 0; result1 = "pass"; result2 = "fail: did not hit code after inner loop"; result3 = "pass"; outer: { do { inner: {// print( i ); break inner; result1 = "fail: did break ...
testcases[tc++] = new TestCase( SECTION, "break out of inner loop", "pass", result1 );
new TestCase( SECTION, "break out of inner loop", "pass", result1 );
function NestedLabel() { i = 0; result1 = "pass"; result2 = "fail: did not hit code after inner loop"; result3 = "pass"; outer: { do { inner: {// print( i ); break inner; result1 = "fail: did break ...
testcases[tc++] = new TestCase( SECTION, "break out of outer loop", "pass", result2 ); }
new TestCase( SECTION, "break out of outer loop", "pass", result2 ); }
function NestedLabel() { i = 0; result1 = "pass"; result2 = "fail: did not hit code after inner loop"; result3 = "pass"; outer: { do { inner: {// print( i ); break inner; result1 = "fail: did break ...
testcases[tc++] = new TestCase( SECTION, object.description, object.result, result ); }
new TestCase( SECTION, object.description, object.result, result ); }
function NestedTry( object ) { result = 0; try { object.tryOne(); result += 1; try { object.tryTwo(); result += 2; } catch ( e ) { result +=4; } finally { result += 8; } ...
if ((-1 != this.MAX_CONNECT_ATTEMPTS) && (this.connectAttempt >= this.MAX_CONNECT_ATTEMPTS)) { this.state = NET_OFFLINE; var ev = new CEvent("network", "error", this, "onError"); ev.debug = "Connection attempts exhausted, giving up."; ev.errorCode = JSIRC_ERR_EXHAUSTED; this.eventPump.addEvent(ev); return; }
function net_delayedConnect(eventProperties){ function reconnectFn(network, eventProperties) { network.immediateConnect(eventProperties); }; this.state = NET_WAITING; this.reconnectTimer = setTimeout(reconnectFn, this.getReconnectDelayMs(), ...
if ((-1 != this.MAX_CONNECT_ATTEMPTS) && (this.connectAttempt > this.MAX_CONNECT_ATTEMPTS)) { this.state = NET_OFFLINE; ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Connection attempts exhausted, giving up."; ev.errorCode = JSIRC_ERR_EXHAUSTED; this.eventPump.addEvent(ev); retu...
function net_doconnect(e){ const NS_ERROR_OFFLINE = 0x804b0010; var c; // Clear the timer, if there is one. if ("reconnectTimer" in this) { clearTimeout(this.reconnectTimer); delete this.reconnectTimer; } var ev; if (this.state == NET_CANCELLING) { if ("primServ" in this ...
if (this.serverList.length == 1 && this.serverList[0].unicodeName == this.unicodeName && this.serverList[0].port != 6667) {
if (this.temporary)
function net_geturl(target){ if (this.serverList.length == 1 && this.serverList[0].unicodeName == this.unicodeName && this.serverList[0].port != 6667) { return this.serverList[0].getURL(target); } if (!target) target = ""; /* Determine whether to use the irc:// or ircs:// sche...
}
function net_geturl(target){ if (this.serverList.length == 1 && this.serverList[0].unicodeName == this.unicodeName && this.serverList[0].port != 6667) { return this.serverList[0].getURL(target); } if (!target) target = ""; /* Determine whether to use the irc:// or ircs:// sche...
openCalendarWizard(afterCreateWizardFinish);
openCalendarWizard();
function newCalendarDialog(){ openCalendarWizard(afterCreateWizardFinish);}
if (gOkCallback) { SetCardValues(editCard.card, document); var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); gOkCallback(addressbook.abCardToEscapedVCard(editCard.card)); return true; }
function NewCardOKButton(){ var popup = document.getElementById('abPopup'); if ( popup ) { var uri = popup.getAttribute('value'); // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template // should be able to just remove this if we are not seeing blank lines in the ab po...
cardproperty.AddCardToDatabase(uri);
cardproperty.addCardToDatabase(uri);
function NewCardOKButton(){ var popup = document.getElementById('abPopup'); if ( popup ) { var uri = popup.value; // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template // should be able to just remove this if we are not seeing blank lines in the ab popup if ( !uri ) retu...
editCard.card.addCardToDatabase(uri); CallSaveListeners();
var directory = GetDirectoryFromURI(uri); var addedCard = directory.addCard(editCard.card); editCard.card = addedCard; NotifySaveListeners();
function NewCardOKButton(){ var popup = document.getElementById('abPopup'); if ( popup ) { var uri = popup.getAttribute('value'); // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template // should be able to just remove this if we are not seeing blank lines in the ab po...
var result = {value:0}; var name = promptService.prompt(window, newTitle, promptStr, result, null, {value:0}); if ((!result.value) || result.value == "") return(false);
var result = {value:null}; var confirmed = promptService.prompt(window, newTitle, promptStr, result, null, {value:0}); if (!confirmed || (!result.value) || result.value == "") return(false);
function NewCategory(){ var promptStr = bundle.GetStringFromName("NewCategoryPrompt"); var newTitle = bundle.GetStringFromName("NewCategoryTitle"); var result = {value:0}; var name = promptService.prompt(window, newTitle, promptStr, result, null, {value:0}); if ((!result.value) || result.value == "") return(f...
var name = promptService.prompt(window, newTitle, promptStr, "", 0, "",result);
var name = promptService.prompt(window, newTitle, promptStr, result, null, {value:0});
function NewCategory(){ var promptStr = bundle.GetStringFromName("NewCategoryPrompt"); var newTitle = bundle.GetStringFromName("NewCategoryTitle"); var result = {value:0}; var name = promptService.prompt(window, newTitle, promptStr, "", 0, "",result); if ((!result.value) || result.value == "") return(false); ...
var name = promptService.Prompt(window, newTitle, promptStr, "", 0, "",result);
var name = promptService.prompt(window, newTitle, promptStr, "", 0, "",result);
function NewCategory(){ var promptStr = bundle.GetStringFromName("NewCategoryPrompt"); var newTitle = bundle.GetStringFromName("NewCategoryTitle"); var result = {value:0}; var name = promptService.Prompt(window, newTitle, promptStr, "", 0, "",result); if ((!result.value) || result.value == "") return(false); ...
if (select_list && select_list.length > 0)
if (select_list && select_list.item(0))
function NewCategory(){ var promptStr = bundle.GetStringFromName("NewCategoryPrompt"); var newTitle = bundle.GetStringFromName("NewCategoryTitle"); var result = {value:null}; var confirmed = promptService.prompt(window, newTitle, promptStr, result, null, {value:0}); if (!confirmed || (!result.value) || result.valu...
function newDateTime(aPRTime, isLocalTime) { var t = CalDateTime(); if (!isLocalTime)
function newDateTime(aNativeTime, aTimezone) { var t = new CalDateTime(); if (aTimezone == "UTC") { t.setTimeInTimezone(aNativeTime, null);
function newDateTime(aPRTime, isLocalTime) { var t = CalDateTime(); if (!isLocalTime) t.isUtc = true; else t.isUtc = false; t.nativeTime = aPRTime; return t;}
else
} else if (aTimezone) { t.setTimeInTimezone(aNativeTime, aTimezone) } else { t.setTimeInTimezone(aNativeTime, null);
function newDateTime(aPRTime, isLocalTime) { var t = CalDateTime(); if (!isLocalTime) t.isUtc = true; else t.isUtc = false; t.nativeTime = aPRTime; return t;}
t.nativeTime = aPRTime;
t.timezone = null; }
function newDateTime(aPRTime, isLocalTime) { var t = CalDateTime(); if (!isLocalTime) t.isUtc = true; else t.isUtc = false; t.nativeTime = aPRTime; return t;}
if(gNewServer && gNewServerString) {
if(gUpdate && gNewServer && gNewServerString) {
function newDirectory(){ window.openDialog("chrome://messenger/content/addressbook/pref-directory-add.xul", "addDirectory", "chrome,modal=yes,resizable=no"); if(gNewServer && gNewServerString) { var tree = document.getElementById("directoriesTree_root"); var item = document.createElement('tre...
function NewEditorWindow(aPageURL)
function NewEditorWindow()
function NewEditorWindow(aPageURL){ // Open editor window with blank page // Kludge to leverage openDialog non-modal! window.openDialog( "chrome://editor/content", "_blank", "chrome,all,dialog=no", "about:blank");}
function newEvent( startDate, endDate )
function newEvent( startDate, endDate, allDay )
function newEvent( startDate, endDate ){ // create a new event to be edited and added var calendarEvent = createEvent(); if( !startDate ) startDate = gCalendarWindow.currentView.getNewEventDate(); calendarEvent.start.setTime( startDate ); if( !endDate ) { var MinutesToAddOn = getIntPref(gCale...
if( allDay ) calendarEvent.allDay = true;
function newEvent( startDate, endDate ){ // create a new event to be edited and added var calendarEvent = createEvent(); if( !startDate ) startDate = gCalendarWindow.currentView.getNewEventDate(); calendarEvent.start.setTime( startDate ); if( !endDate ) { var MinutesToAddOn = getIntPref(gCale...
var categoriesStringBundle = srGetStrBundle("chrome: var MinutesToAddOn = getIntPref(gCalendarWindow.calendarPreferences.calendarPref, "event.defaultlength", categoriesStringBundle.GetStringFromName("defaultEventLength" ) );
var MinutesToAddOn = getIntPref(gCalendarWindow.calendarPreferences.calendarPref, "event.defaultlength", gCalendarBundle.getString("defaultEventLength" ) );
function newEvent( startDate, endDate ){ // create a new event to be edited and added var calendarEvent = createEvent(); calendarEvent.start.setTime( startDate ); if( !endDate ) { var categoriesStringBundle = srGetStrBundle("chrome://calendar/locale/calendar.properties"); var MinutesToAddOn...
Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ;
var Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ;
function newEventCommand(){ var startDate = gCalendarWindow.currentView.getNewEventDate(); Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ; startDate = new Date( startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), ...
dump("uri,name in callback = " + uri + "," + name + "\n"); top.okCallback(name, uri);
if (name.length <= 0 || uri.length <=0) return false; if (!dualUseFolders && foldersOnly && name.charAt(name.length-1) != "/") { top.okCallback(name + "/", uri); } else { top.okCallback(name, uri); }
function newFolderNameOKButtonCallback(){ if ( top.okCallback ) { var name = document.getElementById("name").value; var picker = document.getElementById(pickerID); var uri = picker.getAttribute("uri"); dump("uri,name in callback = " + uri + "," + name + "\n"); top.okCallback(name, uri); } return true;}
if (!dualUseFolders) { var newFolderTypeBox = document.getElementById("newFolderTypeBox"); if (newFolderTypeBox) { newFolderTypeBox.setAttribute("hidden", "false"); window.sizeToContent(); } }
function newFolderNameOnLoad(pickerDOMID){ pickerID = pickerDOMID; doSetOKCancel(newFolderNameOKButtonCallback, newFolderNameCancelButtonCallback); // look in arguments[0] for parameters if (window.arguments && window.arguments[0]) { if ( window.arguments[0].title ) { // dump("title = " + window.arguments[0].title +...
addressList = addressList + (i > 0 ? ",":"") + addresses.GetElementAt(i).QueryInterface(Components.interfaces.nsISupportsString).data;
addressList = addressList + (i > 0 ? ",":"") + addresses.GetElementAt(i).QueryInterface(Components.interfaces.nsISupportsCString).data;
function NewMessageToSelectedAddresses(type, format, identity) { var abSidebarPanel = document.commandDispatcher.focusedWindow; var abResultsTree = abSidebarPanel.document.getElementById("abResultsTree"); var abResultsBoxObject = abResultsTree.treeBoxObject; var abView = abResultsBoxObject.view; abView = abView.Qu...
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
function newObject(progID, iface){ if (!jsenv.HAS_XPCOM) return null; var obj = Components.classes[progID].createInstance(); var rv; switch (typeof iface) { case "string": rv = obj.QueryInterface(Components.interfaces[iface]); break; case "object": rv...
var startDate = gCalendarWindow.currentView.getNewEventDate(); var Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ; startDate = new Date( startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), startDate.getHours(), Minutes, 0); calendarToDo.start.setTime( startDate ); var MinutesToAddOn = getInt...
calendarToDo.start.setTime( k_NO_DATE ); calendarToDo.due.setTime( k_NO_DATE );
function newToDoCommand(){ var calendarToDo = createToDo(); var startDate = gCalendarWindow.currentView.getNewEventDate(); var Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ; startDate = new Date( startDate.getFullYear(), startDate.getMonth(), startD...
calendarToDo.start.setTime( dueDate );
function newToDoCommand(){ var calendarToDo = createToDo(); var dueDate = gCalendarWindow.currentView.getNewEventDate(); var Minutes = Math.ceil( dueDate.getMinutes() / 5 ) * 5 ; dueDate = new Date( dueDate.getFullYear(), dueDate.getMonth(), dueDate.getDate()...
SelectFirstItem();
function next(){ var deck = document.getElementById("stateDeck"); var index = deck.getAttribute("selectedIndex"); switch (index) { case "0": var backButton = document.getElementById("back"); backButton.removeAttribute("disabled"); var radioGroup = document.getElementById("importFields"); SwitchType(radi...
return !node || (node.localName != 'HR' && editorShell.NodeIsBlock(node));
var editor = GetCurrentEditor(); return !editor || !node || (node.localName != 'HR' && editor.nodeIsBlock(node));
function nodeIsBlock(node){ // HR doesn't count because it's not a container return !node || (node.localName != 'HR' && editorShell.NodeIsBlock(node));}
'viewHistorySidebar', 'Browser:AddBookmarkAs', 'Tools:Search', 'View:PageInfo'];
'viewHistorySidebar', 'Browser:AddBookmarkAs', 'Tools:Search', 'View:PageInfo', 'Tasks:InspectPage'];
function nonBrowserWindowStartup(){ // Disable inappropriate commands / submenus var disabledItems = ['cmd_newNavigatorTab', 'cmd_close', 'Browser:SavePage', 'Browser:SendLink', 'cmd_pageSetup', 'cmd_print', 'cmd_find', 'cmd_findAgain', 'viewToolbarsMenu', 'cmd_toggleTaskba...
'cmd_toggleTaskbar', 'viewSidebarMenuMenu', 'Browser:Reload', 'viewTextZoomMenu', 'pageStyleMenu', 'charsetMenu', 'View:PageSource', 'View:FullScreen',
'cmd_toggleTaskbar', 'viewSidebarMenuMenu', 'Browser:Reload', 'Browser:ReloadSkipCache', 'viewTextZoomMenu', 'pageStyleMenu', 'charsetMenu', 'View:PageSource', 'View:FullScreen',
function nonBrowserWindowStartup(){ // Disable inappropriate commands / submenus var disabledItems = ['cmd_newNavigatorTab', 'cmd_close', 'Browser:SavePage', 'Browser:SendLink', 'cmd_pageSetup', 'cmd_print', 'cmd_find', 'cmd_findAgain', 'viewToolbarsMenu', 'cmd_toggleTaskba...
if (!helpBaseURI) { return links; } var ls = links.split(/\s+/); if (ls.length == 0) { return links; } for (var i=0; i < ls.length; ++i) { if (ls[i] == "") { continue; } if (ls[i].substr(0,7) != "chrome:" && ls[i].substr(0,4) != "rdf:") { ls[i] = helpBaseURI + ls[i]; } } return ls.join(" ");
if (!helpBaseURI) { return links; } var ls = links.split(/\s+/); if (ls.length == 0) { return links; } for (var i=0; i < ls.length; ++i) { if (ls[i] == "") continue; if (ls[i].substr(0,7) != "chrome:" && ls[i].substr(0,4) != "rdf:") ls[i] = helpBaseURI + ls[i]; } return ls.join(" ");
function normalizeLinks(helpBaseURI, links) { if (!helpBaseURI) { return links; } var ls = links.split(/\s+/); if (ls.length == 0) { return links; } for (var i=0; i < ls.length; ++i) { if (ls[i] == "") { continue; } if (ls[i].substr(0,7) != "chrome:" && ls...
r = ""
var r = "";
function Not( n ) { n = ToInt32(n); n = ToInt32BitString(n); r = "" for( var l = 0; l < n.length; l++ ) { r += ( n.charAt(l) == "0" ) ? "1" : "0"; } n = ToInt32Decimal(r); return n;}
dump("Updating 'create' commands\n");
NotifyDocumentCreated: function() { // Call EditorSetDefaultPrefs first so it gets the default author before initing toolbars EditorSetDefaultPrefs(); EditorInitToolbars(); // udpate menu items now that we have an editor to play with //dump("Updating 'create' commands\n"); window.content.focus...
DoRecentFilesMenuSave(); BuildRecentMenu();
BuildRecentMenu(true);
NotifyDocumentCreated: function() { // Call EditorSetDefaultPrefs first so it gets the default author before initing toolbars EditorSetDefaultPrefs(); EditorInitToolbars(); DoRecentFilesMenuSave(); // Save the recent files menu BuildRecentMenu(); window._content.focus(); // udpate menu items...
DoRecentFilesMenuSave();
NotifyDocumentCreated: function() { // Call EditorSetDefaultPrefs first so it gets the default author before initing toolbars EditorSetDefaultPrefs(); EditorInitToolbars(); // udpate menu items now that we have an editor to play with dump("Updating 'create' commands\n"); window._content.focus(...
BuildRecentMenu();
NotifyDocumentCreated: function() { // Call EditorSetDefaultPrefs first so it gets the default author before initing toolbars EditorSetDefaultPrefs(); EditorInitToolbars(); // udpate menu items now that we have an editor to play with dump("Updating 'create' commands\n"); window._content.focus(...
if ("onToolbarCustomizeComplete" in window.opener.top) window.opener.top.onToolbarCustomizeComplete();
if ("customizeDone" in gToolbox) gToolbox.customizeDone(gToolboxChanged);
function notifyParentComplete(){ if ("onToolbarCustomizeComplete" in window.opener.top) window.opener.top.onToolbarCustomizeComplete();}
dump("Creating a content listener..\n");
function nsBrowserContentListener(toplevelWindow, contentWindow){ dump("Creating a content listener..\n"); // this one is not as easy as you would hope. // need to convert toplevelWindow to an XPConnected object, instead // of a DOM-based object, to be able to QI() it to nsIXULWindow this.init(to...
this.inDirList = false;
function nsContextMenu( xulMenu ) { this.target = null; this.menu = null; this.onTextInput = false; this.onImage = false; this.onLink = false; this.onSaveableLink = false; this.link = false; this.inFrame = false; this.hasBGImage = false; // Initialize new menu. ...
this.onLoadedImage = false;
function nsContextMenu( xulMenu ) { this.target = null; this.menu = null; this.popupURL = null; this.onTextInput = false; this.onImage = false; this.onLink = false; this.onMailtoLink = false; this.onSaveableLink = false; this.onMetaDataItem = false;...
dump("... leaving nsContextMenu constructor in nsContextMenu.js\n");
function nsContextMenu( xulMenu ) { this.target = null; this.menu = null; this.onTextInput = false; this.onImage = false; this.onLink = false; this.onSaveableLink = false; this.link = false; this.inFrame = false; this.hasBGImage = false; this.inDirList = false; ...
this.linkURL = ""; this.linkURI = null; this.linkProtocol = null;
function nsContextMenu( xulMenu ) { this.target = null; this.menu = null; this.onTextInput = false; this.onKeywordField = false; this.onImage = false; this.onLoadedImage = false; this.onLink = false; this.onMailtoLink = false; thi...
this.shouldDisplay = true;
function nsContextMenu( xulMenu ) { this.target = null; this.menu = null; this.onTextInput = false; this.onImage = false; this.onLink = false; this.onSaveableLink = false; this.link = false; this.inFrame = false; this.hasBGImage = false; this.inDirList = false; ...
this.mDisplayDirectory.initWithUnicodePath(lastDirectory);
this.mDisplayDirectory.initWithPath(lastDirectory);
function nsFilePicker(){ if (!bundle) bundle = srGetStrBundle("chrome://global/locale/filepicker.properties"); /* attributes */ this.mDefaultString = ""; this.mFilterIndex = 0; if (lastDirectory) { this.mDisplayDirectory = Components.classes[LOCAL_FILE_CONTRACTID].createInstance(nsILocalFile); this.mDispl...
return CalendarModule;
return ChatzillaModule;
function NSGetModule(compMgr, fileSpec) { return CalendarModule;}
this.mPersist = makeWebBrowserPersist();
function nsHeaderSniffer(aURL, aCallback, aData){ this.mPersist = makeWebBrowserPersist(); this.mCallback = aCallback; this.mData = aData; this.mPersist.progressListener = this; this.mTempFile = makeTempFile(); while (this.mTempFile.exists()) this.mTempFile = makeTempFile(); const stdURLContractID = "...
this.mPersist.progressListener = this; this.mTempFile = makeTempFile(); while (this.mTempFile.exists()) this.mTempFile = makeTempFile();
function nsHeaderSniffer(aURL, aCallback, aData){ this.mPersist = makeWebBrowserPersist(); this.mCallback = aCallback; this.mData = aData; this.mPersist.progressListener = this; this.mTempFile = makeTempFile(); while (this.mTempFile.exists()) this.mTempFile = makeTempFile(); const stdURLContractID = "...
this.mPersist.saveURI(this.uri, null, this.mTempFile);
this.linkChecker = Components.classes["@mozilla.org/network/urichecker;1"] .createInstance().QueryInterface(Components.interfaces.nsIURIChecker); var flags; if (aData.bypassCache) { flags = Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE; } else { flags = Components.interfaces.nsIRequest.LOAD_FROM_CACHE; } this.li...
function nsHeaderSniffer(aURL, aCallback, aData){ this.mPersist = makeWebBrowserPersist(); this.mCallback = aCallback; this.mData = aData; this.mPersist.progressListener = this; this.mTempFile = makeTempFile(); while (this.mTempFile.exists()) this.mTempFile = makeTempFile(); const stdURLContractID = "...
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
function nsLDAPPrefsService() { var arrayOfDirectories; var j = 0; try { gPrefInt = Components.classes["@mozilla.org/preferences-service;1"]; gPrefInt = gPrefInt.getService(nsIPrefBranch); } catch (ex) { dump("failed to get prefs service!\n"); return; } /* generate the list of directory servers from ...
arrayOfDirectories = gPrefInt.getChildList("ldap_2.servers", prefCount);
arrayOfDirectories = this.getServerList(gPrefInt, prefCount);
function nsLDAPPrefsService() { var arrayOfDirectories; var j = 0; try { gPrefInt = Components.classes["@mozilla.org/preferences-service;1"]; gPrefInt = gPrefInt.getService(nsIPrefBranch); } catch (ex) { dump("failed to get prefs service!\n"); return; } /* generate the list of directory servers from ...
if (max.value) { var newIndex = max.value - (max.value - min.value); if (newIndex >= this.getOutlinerView().rowCount) --newIndex; this.getOutlinerSelection().select(newIndex); }
function nsOutlinerController_delete(){ var rangeCount = this.getOutlinerSelection().getRangeCount(); if (rangeCount < 1) return false; if (!gRDFC) gRDFC = Components.classes[rdfc_contractid].getService(nsIRDFContainer); var datasource = this.getOutlinerBody().database; var min = new Object(); var ...
this.wsm.attributes = ["preftype", "prefstring", "prefattribute", "disabled"];
this.wsm.attributes = ["preftype", "prefstring", "prefattribute", "prefinverse", "disabled"];
function nsPrefWindow( frame_id ){ if ( !frame_id ) throw "Error: frame_id not supplied!"; this.contentFrame = frame_id this.wsm = new nsWidgetStateManager( frame_id ); this.wsm.attributes = ["preftype", "prefstring", "prefattribute", "disabled"]; this.pref = null; this.chromeRegistry = ...
this.wsm.attributes = ["pref", "preftype", "prefstring", "prefattribute"];
this.wsm.attributes = ["pref", "preftype", "prefstring", "prefattribute", "disabled"];
function nsPrefWindow( frame_id ){ if ( !frame_id ) throw "Error: frame_id not supplied!"; this.contentFrame = frame_id this.wsm = new nsWidgetStateManager( frame_id ); this.wsm.attributes = ["pref", "preftype", "prefstring", "prefattribute"]; this.pref = null; this.cancelHandlers = []...
this.mPaused = null;
this.mPaused = false;
function nsProgressDialog() { // Initialize data properties. this.mParent = null; this.mOperation = null; this.mStartTime = ( new Date() ).getTime(); this.observer = null; this.mLastUpdate = Number.MIN_VALUE; // To ensure first onProgress causes update. this.mInterval = 750; // Def...
this.mBundle = null;
function nsProgressDialog() { // Initialize data properties. this.mParent = null; this.mOperation = null; this.mStartTime = ( new Date() ).getTime(); this.observer = null; this.mLastUpdate = Number.MIN_VALUE; // To ensure first onProgress causes update. this.mInterval = 750; // Def...
this.buildID = app.geckoBuildID;
this.buildID = app.platformBuildID;
function nsRDFItemUpdater(aClientOS, aChromeLocale){ this._rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"] .getService(Components.interfaces.nsIRDFService); this._os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces...
const PROMPTSERVICE_CONTRACTID = "@mozilla.org/embedcomp/prompt-service;1"; const nsIPromptService = Components.interfaces.nsIPromptService; this.promptService = Components.classes[PROMPTSERVICE_CONTRACTID].getService(nsIPromptService);
function nsSidebar(){ const RDF_CONTRACTID = "@mozilla.org/rdf/rdf-service;1"; const nsIRDFService = Components.interfaces.nsIRDFService; this.rdf = Components.classes[RDF_CONTRACTID].getService(nsIRDFService); this.datasource_uri = getSidebarDatasourceURI(PANELS_RDF_FILE); debug('datasource_uri is '...
this.doDelete();
this.doDelete(tree);
function nsTreeController_cut(tree){ if (this.copy()) { this.doDelete(); return true; // copy succeeded, don't care if delete failed } else return false; // copy failed, so did cut}
var textData = Components.classes[supportswstring_contractid].createInstance(nsISupportsWString);
var textData = Components.classes[supportswstring_contractid].createInstance(nsISupportsString);
function nsTreeController_SetTransferData(transferable, flavor, text){ if (!text) return; var textData = Components.classes[supportswstring_contractid].createInstance(nsISupportsWString); textData.data = text; transferable.addDataFlavor(flavor); transferable.setTransferData(flavor, textData, text.length*2);}
this.dataManager = { pageData: [],
this.dataManager = { pageData: { },
function nsWidgetStateManager ( aFrameID ) { this.dataManager = { /** Persisted Data Hash Table * Page_ID -> Element_ID -> Property -> Value **/ pageData: [], setPageData: function ( aPageTag, aDataObject ) { this.pageData[aPageTag] = aData...
getPageData: function ( aPageTag ) { if( !(aPageTag in this.pageData) ) this.pageData[aPageTag] = []; return this.pageData[aPageTag]; },
getPageData: function (aPageTag) { if (!(aPageTag in this.pageData)) this.pageData[aPageTag] = { }; return this.pageData[aPageTag]; },
function nsWidgetStateManager ( aFrameID ) { this.dataManager = { /** Persisted Data Hash Table * Page_ID -> Element_ID -> Property -> Value **/ pageData: [], setPageData: function ( aPageTag, aDataObject ) { this.pageData[aPageTag] = aData...
setItemData: function ( aPageTag, aItemID, aDataObject ) { if( !(aPageTag in this.pageData) ) this.pageData[aPageTag] = []; this.pageData[aPageTag][aItemID] = aDataObject; },
setItemData: function (aPageTag, aItemID, aDataObject) { if (!(aPageTag in this.pageData)) this.pageData[aPageTag] = new Object(); this.pageData[aPageTag][aItemID] = aDataObject; },
function nsWidgetStateManager ( aFrameID ) { this.dataManager = { /** Persisted Data Hash Table * Page_ID -> Element_ID -> Property -> Value **/ pageData: [], setPageData: function ( aPageTag, aDataObject ) { this.pageData[aPageTag] = aData...
getItemData: function ( aPageTag, aItemID ) { if( !(aItemID in this.pageData[aPageTag]) ) this.pageData[aPageTag][aItemID] = []; return this.pageData[aPageTag][aItemID]; } }
getItemData: function (aPageTag, aItemID) { if (!(aItemID in this.pageData[aPageTag])) this.pageData[aPageTag][aItemID] = new Object(); return this.pageData[aPageTag][aItemID]; } }
function nsWidgetStateManager ( aFrameID ) { this.dataManager = { /** Persisted Data Hash Table * Page_ID -> Element_ID -> Property -> Value **/ pageData: [], setPageData: function ( aPageTag, aDataObject ) { this.pageData[aPageTag] = aData...
observe: function (aMsgObject)
observe: function(subject, topic, prefName)
observe: function (aMsgObject) { const nsIScriptError = Components.interfaces.nsIScriptError; var scriptError = aMsgObject.QueryInterface(nsIScriptError); var isWarning = scriptError.flags & nsIScriptError.warningFlag != 0; if (!isWarning) { var statusbarDisplay = document.getElementById("statusbar-...
const nsIScriptError = Components.interfaces.nsIScriptError; var scriptError = aMsgObject.QueryInterface(nsIScriptError); var isWarning = scriptError.flags & nsIScriptError.warningFlag != 0; if (!isWarning) { var statusbarDisplay = document.getElementById("statusbar-display"); statusbarDisplay.setAttribute("error", "tr...
if (topic != "nsPref:changed") return; if (prefName.substr(0, this.domain.length) != this.domain) return; var buttonName = prefName.substr(this.domain.length+1); var buttonId = buttonName + "-button"; var button = document.getElementById(buttonId); var show = pref.GetBoolPref(prefName); if (show) button.setAttribute(...
observe: function (aMsgObject) { const nsIScriptError = Components.interfaces.nsIScriptError; var scriptError = aMsgObject.QueryInterface(nsIScriptError); var isWarning = scriptError.flags & nsIScriptError.warningFlag != 0; if (!isWarning) { var statusbarDisplay = document.getElementById("statusbar-...
const kITimerScriptable = Components.interfaces.nsITimerScriptable;
const kIScriptableTimer = Components.interfaces.nsIScriptableTimer;
observe: function(aSubject, aTopic, aData) { debug("observe: " + aTopic); if (aTopic == "domwindowopened") { try { const kITimerScriptable = Components.interfaces.nsITimerScriptable; mTimer = Components.classes["@mozilla.org/timer;1"]. createInstance(kITimerScriptable); ...