rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
var oldStartTime = startTime; | if( weekNumber > 3 ) { var nextWeek = new Date( oldStartTime.getTime() + ( 1000 * 60 * 60 * 24 * 7 ) ); if( nextWeek.getMonth() != thisMonth ) { return( true ); } } | function isLastDayOfWeekOfMonth(){ //get the day number for today. var startTime = document.getElementById( "start-date-picker" ).value; var oldStartTime = startTime; var thisMonth = startTime.getMonth(); var monthToCompare = thisMonth; var weekNumber = 0; while( monthToCompare == thisMonth ) { ... |
var thisMonth = startTime.getMonth(); var monthToCompare = thisMonth; var weekNumber = 0; while( monthToCompare == thisMonth ) { startTime = new Date( startTime.getTime() - ( 1000 * 60 * 60 * 24 * 7 ) ); monthToCompare = startTime.getMonth(); weekNumber++; } if( weekNumber > 3 ) { var nextWeek = new Date( oldStar... | return( false ); | function isLastDayOfWeekOfMonth(){ //get the day number for today. var startTime = document.getElementById( "start-date-picker" ).value; var oldStartTime = startTime; var thisMonth = startTime.getMonth(); var monthToCompare = thisMonth; var weekNumber = 0; while( monthToCompare == thisMonth ) { ... |
dump( "Bug! Link.protocol is still undefined!\n" ); var protocol = link.href.substr( 0, 11 ); return protocol != "javascript:"; | var protocol; if (link.href) { protocol = link.href.substr( 0, 11 ); } else { protocol = link.getAttributeNS("http: if (protocol) { protocol = protocol.substr( 0, 11 ); } } return protocol.toLowerCase() != "javascript:"; | isLinkSaveable : function ( link ) { // Test for missing protocol property. if ( !link.protocol ) { // We must resort to testing the URL string :-(. dump( "Bug! Link.protocol is still undefined!\n" ); var protocol = link.href.substr( 0, 11 ); return protocol != ... |
return link.protocol != "javascript:"; | return link.protocol.toLowerCase() != "javascript:"; | isLinkSaveable : function ( link ) { // Test for missing protocol property. if ( !link.protocol ) { // We must resort to testing the URL string :-(. dump( "Bug! Link.protocol is still undefined!\n" ); var protocol = link.href.substr( 0, 11 ); return protocol != ... |
return !(this.isLinkType( "mailto:" , link ) || this.isLinkType( "javascript:" , link ) || this.isLinkType( "news:", link ) || this.isLinkType( "snews:", link ) ); | return this.linkProtocol && !( this.linkProtocol == "mailto" || this.linkProtocol == "javascript" || this.linkProtocol == "news" || this.linkProtocol == "snews" ); | isLinkSaveable : function ( link ) { // We don't do the Right Thing for news/snews yet, so turn them off // until we do. return !(this.isLinkType( "mailto:" , link ) || this.isLinkType( "javascript:" , link ) || this.isLinkType( "news:", link ) || ... |
if (hostNameIsIPAddress(hrefURL.host, unobscuredHostName)) | if (hostNameIsIPAddress(hrefURL.host, unobscuredHostName) && !isLocalIPAddress(unobscuredHostName)) | function isPhishingURL(aLinkNode, aSilentMode, aHref){ if (!gPrefBranch.getBoolPref("mail.phishing.detection.enabled")) return false; var phishingType = kPhishingNotSuspicious; var href = aHref || aLinkNode.href; if (!href) return false; var linkTextURL = {}; var unobscuredHostName = {}; var isPhishingURL ... |
switch(contentType) { case "text/html": case "text/xul": case "text/rdf": case "text/xml": case "text/css": case "image/gif": case "image/jpeg": case "image/png": case "text/plain": case "application/http-index-format": | try { var catMgr = Components.classes["@mozilla.org/categorymanager;1"] .getService(Components.interfaces.nsICategoryManager); var entry = catMgr.getCategoryEntry("Gecko-Content-Viewers", contentType); if (entry) { | isPreferred: function(contentType, desiredContentType) { // seems like we should be getting this from helper apps or something switch(contentType) { case "text/html": case "text/xul": case "text/rdf": case "text/xml": case "text/css": ... |
return false; | isPreferred: function(contentType, desiredContentType) { // seems like we should be getting this from helper apps or something switch(contentType) { case "text/html": case "text/xul": case "text/rdf": case "text/xml": case "text/css": ... | |
return (this.itemBasePromotedProps[name]); | return (this.itemBasePromotedProps[name.toUpperCase()]); | isPropertyPromoted: function (name) { return (this.itemBasePromotedProps[name]); }, |
return false; | var ip = dnsResolve(host); return (ip != null) ? true: false; | function isResolvable(host) { // call back into IOService and get the result... TODO return false;} |
/* Valid language codes examples: | /* reject bogus lang strings, INCLUDING those with HTTP "q" values kludged on the end of them Valid language codes examples: | function IsRFC1766LangTag(candidate) { /* Valid language codes examples: i.e. ja-JP-kansai (Kansai dialect of Japanese) en-US-texas (Texas dialect) i-klingon-tng (did TOS Klingons speak in non-English?) sgn-US-MA (Martha Vineyard's Sign Language) */ var tags = candidate.split('-'); /*... |
aAction == "move" && aSelection.parent[i] == aTarget.parent) | aAction == "move" && aSelection.parent[i] == aTarget.parent || aSelection.isContainer[i]) | isSelectionValidForInsertion: function (aSelection, aTarget, aAction) { var isValid = new Array(aSelection.length); for (var i=0; i<aSelection.length; ++i) isValid[i] = false; if (!BookmarksUtils.isValidTargetContainer(aTarget.parent, aSelection)) return isValid; for (i=0; i<aSelection.length; ... |
function IsSpecialFolder(msgFolder, specialFolderNames) | function IsSpecialFolder(msgFolder, flags) | function IsSpecialFolder(msgFolder, specialFolderNames){ var db = GetFolderDatasource(); var folderResource = msgFolder.QueryInterface(Components.interfaces.nsIRDFResource); if(folderResource) { var property = RDF.GetResource('http://home.netscape.com/NC-rdf#SpecialFolder'); if (!property) return false; var result... |
var db = GetFolderDatasource(); var folderResource = msgFolder.QueryInterface(Components.interfaces.nsIRDFResource); if(folderResource) { var property = RDF.GetResource('http: if (!property) return false; var result = db.GetTarget(folderResource, property , true); if (!result) return false; result = result.QueryInterfa... | if ((msgFolder.flags & flags) == 0) { return false; } else { return true; } | function IsSpecialFolder(msgFolder, specialFolderNames){ var db = GetFolderDatasource(); var folderResource = msgFolder.QueryInterface(Components.interfaces.nsIRDFResource); if(folderResource) { var property = RDF.GetResource('http://home.netscape.com/NC-rdf#SpecialFolder'); if (!property) return false; var result... |
var spellcheckerClass = Components.classes["org.mozilla.spellchecker.1"]; | var spellcheckerClass = Components.classes["mozilla.spellchecker.1"]; | function IsSpellCheckerInstalled(){ if (gSoughtSpellChecker) return gHaveSpellChecker; var spellcheckerClass = Components.classes["org.mozilla.spellchecker.1"]; gHaveSpellChecker = (spellcheckerClass != null); gSoughtSpellChecker = true; return gHaveSpellChecker;} |
dump("Have SpellChecker = "+gHaveSpellChecker+"\n"); | function IsSpellCheckerInstalled(){ if (gSoughtSpellChecker) return gHaveSpellChecker; var spellcheckerClass = Components.classes["@mozilla.org/spellchecker;1"]; gHaveSpellChecker = (spellcheckerClass != null); gSoughtSpellChecker = true; dump("Have SpellChecker = "+gHaveSpellChecker+"\n"); return gHaveSpellCh... | |
function IsSubWindowOf(search, wind, found) | function IsSubWindowOf(search, wind) | function IsSubWindowOf(search, wind, found){ //dump("IsSubWindowOf(" + search + ", " + wind + ", " + found + ")\n"); if ( found || (search == wind) ) return true; for ( index = 0; index < wind.frames.length; index++ ) { if ( IsSubWindowOf(search, wind.frames[index], false) ) return true; } return false;} |
if ( found || (search == wind) ) | if (search == wind) | function IsSubWindowOf(search, wind, found){ //dump("IsSubWindowOf(" + search + ", " + wind + ", " + found + ")\n"); if ( found || (search == wind) ) return true; for ( index = 0; index < wind.frames.length; index++ ) { if ( IsSubWindowOf(search, wind.frames[index], false) ) return true; } return false;} |
if ( IsSubWindowOf(search, wind.frames[index], false) ) | if ( IsSubWindowOf(search, wind.frames[index]) ) | function IsSubWindowOf(search, wind, found){ //dump("IsSubWindowOf(" + search + ", " + wind + ", " + found + ")\n"); if ( found || (search == wind) ) return true; for ( index = 0; index < wind.frames.length; index++ ) { if ( IsSubWindowOf(search, wind.frames[index], false) ) return true; } return false;} |
throw new Components.Exception( bLogging ? ("issueSyncRequest( \"" + url + "\" ) failed.") : "issueSyncRequest() failed.", status ); | throw status; | function issueSyncRequest( url, receiverFunc, bLogging ){ if (bLogging == undefined) bLogging = true; if (bLogging && LOG_LEVEL > 0) { logMessage( "issueSyncRequest( \"" + url + "\" )", "opening channel." ); } var channel = getIoService().newChannel( url, "" /* charse... |
(attrib != "PASSWORD") && | isTargetATextBox : function ( node ) { if (node.nodeType != Node.ELEMENT_NODE) return false; if (node.localName.toUpperCase() == "INPUT") { var attrib = ""; var type = node.getAttribute("type"); if (type) attrib = type.toUpperCase(); return( (attrib != "IMAGE... | |
var result = false; var selection = this.searchSelected(16); | var selectedText = getBrowserSelection(16); | isTextSelection : function() { var result = false; var selection = this.searchSelected(16); var searchSelectText; if (selection) { searchSelectText = selection.toString(); if (searchSelectText.length > 15) searchSelectText = searchSelectText.substr(0,... |
var searchSelectText; if (selection) { searchSelectText = selection.toString(); if (searchSelectText.length > 15) searchSelectText = searchSelectText.substr(0,15) + "..."; result = true; | if (!selectedText) return false; | isTextSelection : function() { var result = false; var selection = this.searchSelected(16); var searchSelectText; if (selection) { searchSelectText = selection.toString(); if (searchSelectText.length > 15) searchSelectText = searchSelectText.substr(0,... |
searchSelectText = gNavigatorBundle.getFormattedString("searchText", [searchSelectText]); this.setItemAttr("context-searchselect", "label", searchSelectText); } return result; | if (selectedText.length > 15) selectedText = selectedText.substr(0,15) + "..."; var engineName = ""; var ss = Cc["@mozilla.org/browser/search-service;1"]. getService(Ci.nsIBrowserSearchService); if (BrowserSearch.getSearchBar()) engineName = ss.currentEngine.name; else engineName = ss.defaultEngine.name; var menuL... | isTextSelection : function() { var result = false; var selection = this.searchSelected(16); var searchSelectText; if (selection) { searchSelectText = selection.toString(); if (searchSelectText.length > 15) searchSelectText = searchSelectText.substr(0,... |
switch (cc) { case (0x0009): case (0x000B): case (0x000C): case (0x0020): case (0x000A): case (0x000D): case ( 59 ): return true; break; default: return false; } | switch (cc) { case (0x0009): case (0x000B): case (0x000C): case (0x0020): case (0x000A): case (0x000D): case ( 59 ): return true; break; default: return false; | function IsWhiteSpace( string ) { var cc = string.charCodeAt(0); switch (cc) { case (0x0009): case (0x000B): case (0x000C): case (0x0020): case (0x000A): case (0x000D): case ( 59 ): // let's strip out semicolons, too ... |
} | function IsWhiteSpace( string ) { var cc = string.charCodeAt(0); switch (cc) { case (0x0009): case (0x000B): case (0x000C): case (0x0020): case (0x000A): case (0x000D): case ( 59 ): // let's strip out semicolons, too ... | |
dump ("date: " + date + " newDate: " + newDate + " newDate.jsDate: "+ newDate.jsDate + "\n"); | debug ("date: " + date + " newDate: " + newDate + " newDate.jsDate: "+ newDate.jsDate + "\n"); | function jsDateToDateTime(date){ var newDate = createDateTime(); newDate.jsDate = date; dump ("date: " + date + " newDate: " + newDate + " newDate.jsDate: "+ newDate.jsDate + "\n"); return newDate;} |
this._isPending = true; | function jsdch_aopen (streamListener, context){ this.streamListener = streamListener; this.context = context; if (!window && this.URI.spec == "x-jsd:debugger") { this.contentType = "x-application-jsd"; this.contentLength = 0; streamListener.onStartRequest(this, context); retu... | |
this._isPending = true; | this._isPending = false; | function JSDChannel (uri){ this.URI = uri; this.originalURI = uri; this._isPending = true; var clazz = Components.classes[STRING_STREAM_CTRID]; this.stringStream = clazz.createInstance(nsIStringInputStream);} |
flagstr = (flags && jsdIErrorHook.REPORT_EXCEPTION) ? "x" : "-"; flagstr += (flags && jsdIErrorHook.REPORT_STRICT) ? "s" : "-"; | flagstr = (flags & jsdIErrorHook.REPORT_EXCEPTION) ? "x" : "-"; flagstr += (flags & jsdIErrorHook.REPORT_STRICT) ? "s" : "-"; | function jsdErrorHook (message, fileName, line, pos, flags, exception){ if (!console.initialized || isURLFiltered (fileName)) return true; try { var flagstr; flagstr = (flags && jsdIErrorHook.REPORT_EXCEPTION) ? "x" : "-"; flagstr += (flags && jsdIErrorHook... |
testcases[tc++] = new TestCase( SECTION, "do while ( " + i +" < " + limit +" )", expect, i ); | new TestCase( SECTION, "do while ( " + i +" < " + limit +" )", expect, i ); | function LabeledContinue( limit, expect ) { i = 0; result1 = "pass"; result2 = "pass"; woohoo: { do { i++; if ( ! (i < limit) ) { break woohoo; result1 = "fail: evaluated statement after a labeled break"; } } while ( true ); ... |
testcases[tc++] = new TestCase( SECTION, "breaking out of a do... while loop", "pass", result1 ); | new TestCase( SECTION, "breaking out of a do... while loop", "pass", result1 ); | function LabeledContinue( limit, expect ) { i = 0; result1 = "pass"; result2 = "pass"; woohoo: { do { i++; if ( ! (i < limit) ) { break woohoo; result1 = "fail: evaluated statement after a labeled break"; } } while ( true ); ... |
testcases[tc++] = new TestCase( SECTION, "breaking out of a labeled do...while loop", "pass", result2 ); | new TestCase( SECTION, "breaking out of a labeled do...while loop", "pass", result2 ); | function LabeledContinue( limit, expect ) { i = 0; result1 = "pass"; result2 = "pass"; woohoo: { do { i++; if ( ! (i < limit) ) { break woohoo; result1 = "fail: evaluated statement after a labeled break"; } } while ( true ); ... |
testcases[tc++] = new TestCase( SECTION, "do while ( " + i +" < " + limit +" )", expect, i ); | new TestCase( SECTION, "do while ( " + i +" < " + limit +" )", expect, i ); | function LabeledContinue( limit, expect ) { i = 0; woohoo: do { i++; continue woohoo; } while ( i < limit ); testcases[tc++] = new TestCase( SECTION, "do while ( " + i +" < " + limit +" )", expect, i );} |
testcases[tc++] = new TestCase( SECTION, "yoohoo: for ( property in object ) { result += object[property]; break yoohoo }}", true, result == expect1 || result == expect2 ); } | new TestCase( SECTION, "yoohoo: for ( property in object ) { result += object[property]; break yoohoo }}", true, result == expect1 || result == expect2 ); } | function LabelTest2( object, expect1, expect2 ) { result = ""; yoohoo: { for ( property in object ) { result += object[property]; break yoohoo } }; ; testcases[tc++] = new TestCase( SECTION, "yoohoo: for ( property in object ) { result += object[property]; break yoohoo }}... |
testcases[tc++] = new TestCase( SECTION, "yoohoo: for ( property in object ) { result += object[property]; } break yoohoo }", true, result == expect1 || result == expect2 ); } | new TestCase( SECTION, "yoohoo: for ( property in object ) { result += object[property]; } break yoohoo }", true, result == expect1 || result == expect2 ); } | function LabelTest( object, expect1, expect2 ) { result = ""; yoohoo: { for ( property in object ) { result += object[property]; }; break yoohoo }; testcases[tc++] = new TestCase( SECTION, "yoohoo: for ( property in object ) { result += object[property]; } break yoohoo }"... |
testcases[tc++] = new TestCase( SECTION, "break out of a labeled for loop: "+ limit, expect, result ); } | new TestCase( SECTION, "break out of a labeled for loop: "+ limit, expect, result ); } | function LabelTest( limit, expect) { woo: for ( var result = 0; result < 1000; result++ ) { if (result == limit) { break woo; } else { continue woo; } }; testcases[tc++] = new TestCase( SECTION, "break out of a labeled for loop: "+ limit, expect, result ); ... |
if (result7 == 0) { return Math.min(position, result5); | if (result7 == 0) { return Math.min(position, result5); } result8 = -1; for ( k = 0; k <= result6; k++ ) { if ( k+ result7 > result5 ) { break; | function LastIndexOf( string, search, position ) { string = String( string ); search = String( search ); position = Number( position ) if ( isNaN( position ) ) { position = Infinity; } else { position = ToInteger( position ); } result5= string.length; result6 = Math.min(Math.max(po... |
result8 = -1; for ( k = 0; k <= result6; k++ ) { if ( k+ result7 > result5 ) { break; } for ( j = 0; j < result7; j++ ) { if ( string.charAt(k+j) != search.charAt(j) ){ break; } else { if ( j == result7 -1 ) { result8 = k; } } } } return result8; | return result8; | function LastIndexOf( string, search, position ) { string = String( string ); search = String( search ); position = Number( position ) if ( isNaN( position ) ) { position = Infinity; } else { position = ToInteger( position ); } result5= string.length; result6 = Math.min(Math.max(po... |
if( navigator.vendor != "Thunderbird") { | if( navigator.vendor != "Mozilla Sunbird" ) { | function launchBrowser( UrlToGoTo ){ if( navigator.vendor != "Thunderbird") { var navWindow; // if not, get the most recently used browser window try { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); n... |
catch (ex) { } | function launchBrowser( UrlToGoTo ){ if( navigator.vendor != "Thunderbird") { var navWindow; // if not, get the most recently used browser window try { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); n... | |
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance(); messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger); messenger.launchExternalURL(UrlToGoTo); } catch (ex) {} | var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance(); messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger); messenger.launchExternalURL(UrlToGoTo); } catch (e) { dump("launchBrowser: Exception: "+e+"\n"); } | function launchBrowser( UrlToGoTo ){ if( navigator.vendor != "Thunderbird") { var navWindow; // if not, get the most recently used browser window try { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); n... |
fp.init(window, "Save", nsIFilePicker.modeSave); | fp.init(window, gCalendarBundle.getString( "Save" ), nsIFilePicker.modeSave); | function launchFilePicker(){ // No show the 'Save As' dialog and ask for a filename to save to const nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); // caller can force disable of sand box, even if ON globally fp.init... |
fp.defaultString = "MozillaCalendarFile.ics"; | fp.defaultString = gCalendarBundle.getString( "filepickerDefString" ); | function launchFilePicker(){ // No show the 'Save As' dialog and ask for a filename to save to const nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); // caller can force disable of sand box, even if ON globally fp.init... |
fp.defaultString = "MozillaCalendar"+ServerName+".ics"; | fp.defaultString = gCalendarBundle.getFormattedString( "filepickerDefServerString", [ServerName] ); | function launchFilePicker(){ // No show the 'Save As' dialog and ask for a filename to save to const nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); // caller can force disable of sand box, even if ON globally fp.init... |
const filterCalendar = "Calendar Files"; | const filterCalendar = gCalendarBundle.getString( "filterCalendar" ); | function launchFilePicker(){ // No show the 'Save As' dialog and ask for a filename to save to const nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); // caller can force disable of sand box, even if ON globally fp.init... |
if (applicationName == "Mozilla" || applicationName == "Firebird") | var applicationName = navigator.vendor; if (applicationName == "Mozilla" || applicationName == "Firebird" || applicationName == "") | function launchPreferences(){ if (applicationName == "Mozilla" || applicationName == "Firebird") goPreferences( "calendarPanel", "chrome://calendar/content/pref/calendarPref.xul", "calendarPanel" ); else window.openDialog("chrome://calendar/content/pref/prefBird.xul", "PrefWindow", "chrome,titlebar,... |
selectedItem = dataEls.length ? dataEls[0] : defaultItem; | selectedItem = dataEls.item(0) ? dataEls[0] : defaultItem; | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
if (!dataEls.length) { | if (!dataEls.item(0)) { | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
if (dataEls.length) | if (dataEls.item(0)) | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
selectedItem = dataEls.length ? dataEls[0] : defaultItem; | selectedItem = dataEls.item(0) ? dataEls[0] : defaultItem; | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
if (!dataEls.length) { | if (!dataEls.item(0)) { | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
if (dataEls.length) | if (dataEls.item(0)) | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
var defaultItem = null; | var defaultItem; | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
if (!dataVal.length) { selectedItem = defaultItem; } else { var dataEls = selectElement.listElement.getElementsByAttribute( "value", dataVal ); selectedItem = dataEls.item(0) ? dataEls.item(0) : defaultItem; } | if (dataVal.length) dataEls = selectElement.listElement.getElementsByAttribute("value", dataVal); | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
var dataEls = selectElement.listElement.getElementsByAttribute( "value", selectVal ); | dataEls = selectElement.listElement.getElementsByAttribute("value", selectVal); | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
var stripWhitespace = /^\s*(.*)\s*$/; | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... | |
selectVal = fontNames[j].replace(stripWhitespace, "$1"); | selectVal = fontNames[j].replace(/^\s+|\s+$/, ""); | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... |
selectedItem = dataEls.item(0) ? dataEls.item(0) : defaultItem; | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... | |
selectedItem = defaultItem; | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... | |
if (dataEls && dataEls.item(0)) selectedItem = dataEls[0]; | function lazyAppendFontNames( i ) { // schedule the build of the next font list if (i+1 < fontTypes.length) { window.setTimeout(lazyAppendFontNames, 100, i+1); } // now build and populate the fonts for the requested font type var defaultItem = null; var selectElement = new listE... | |
var option = document.createElement ("html:a"); | var option = document.createElement ("html:div"); | function lbox_add (stuff, tag){ var option = document.createElement ("html:a"); option.setAttribute ("class", "list-option"); option.appendChild (stuff); option.appendChild (document.createElement("html:br")); option.onclick = this.clickHandler; option.listManager = this; option.tag = tag; this.... |
option.appendChild (document.createElement("html:br")); | function lbox_add (stuff, tag){ var option = document.createElement ("html:a"); option.setAttribute ("class", "list-option"); option.appendChild (stuff); option.appendChild (document.createElement("html:br")); option.onclick = this.clickHandler; option.listManager = this; option.tag = tag; this.... | |
dd ("onclick: \n" + dumpObjectTree (e, 1)); | if (e.event.which == 3) { return; } if (!e.event.ctrlKey) { this.enumerateElements(this._unselectCallback, e.realTarget); } var isSelected = e.realTarget.getAttribute("selected"); if ("true" == isSelected) e.realTarget.setAttribute("selected", "false"); else e.realTarget.setAttribute("selected", "true"); | function lbox_chandler (e){ dd ("onclick: \n" + dumpObjectTree (e, 1)); } |
function lbox_enum (callback) | function lbox_enum (callback, data) | function lbox_enum (callback){ var i = 0; var current = this.listContainer.firstChild; while (current) { callback (current, i++); current = current.nextSibling; } } |
callback (current, i++); | callback (current, i++, data); | function lbox_enum (callback){ var i = 0; var current = this.listContainer.firstChild; while (current) { callback (current, i++); current = current.nextSibling; } } |
var option = document.createElement ("html:a"); | var option = document.createElement ("html:div"); | function lbox_prepend (stuff, oldstuff, tag){ if (!this.listContainer.firstChild) return this.add (stuff, tag); var nextOption = this._findOption (oldstuff); if (!nextOption) return false; var option = document.createElement ("html:a"); option.setAttribute ("class", "list-option"); o... |
option.appendChild (document.createElement("html:br")); | function lbox_prepend (stuff, oldstuff, tag){ if (!this.listContainer.firstChild) return this.add (stuff, tag); var nextOption = this._findOption (oldstuff); if (!nextOption) return false; var option = document.createElement ("html:a"); option.setAttribute ("class", "list-option"); o... | |
try { this.vtable = createInstance("@mozilla.org/xpcom/leakdetector;1", "nsILeakDetector"); } catch (err) { } | function LeakDetector(verbose){ this.verbose = verbose; try { this.vtable = createInstance("@mozilla.org/xpcom/leakdetector;1", "nsILeakDetector"); } catch (err) { }} | |
gDialog.Close.setAttribute("label", GetString("Close")); | function LinkCheckTimeOut(){ // We might have gotten here via a late timeout if (gNumLinksToCheck <= 0) return; gLinkCheckTimerID = 0; gNumLinksToCheck = 0; gStartedAllChecks = false; for (var i=0; i < gLinksBeingChecked.length; i++) { var linkChecker = gLinksBeingChecked[i].QueryInterface(Components.inter... | |
var wrapper = this.link; if (wrapper.href) { text = wrapper.href; } else { text = wrapper.getAttributeNS("http: "href"); if (text && text.match(/\S/)) { text = makeURLAbsolute(wrapper.baseURI, text); } } | text = this.linkURL; | linkText : function () { var text = gatherTextUnder( this.link ); if (!text || !text.match(/\S/)) { text = this.link.getAttribute("title"); if (!text || !text.match(/\S/)) { text = this.link.getAttribute("alt"); if (!text || !text.match(/\S/)) { var... |
this.hasItems = false; | function LinkToolbarHandler(){ this.items = new Array();} | |
return this.link.href; | if (this.link.href) { return this.link.href; } var href = this.link.getAttributeNS("http: if (href == "") { throw "Empty href"; } return href; | linkURL : function () { return this.link.href; }, |
return true; | function listClick(event){ if (event.detail == 2 && event.button == 0) searchResultsOpenURL(event);} | |
AddFieldToList( gListbox, top.fieldMap.GetFieldDescription( index), index, top.fieldMap.GetFieldActive( i)); | AddFieldToList(top.fieldMap.GetFieldDescription( index), index, top.fieldMap.GetFieldActive( i)); | function ListFields() { if (top.fieldMap == null) return; var count = top.fieldMap.mapSize; var index; var i; for (i = 0; i < count; i++) { index = top.fieldMap.GetFieldMap( i); AddFieldToList( gListbox, top.fieldMap.GetFieldDescription( index), index, top.fieldMap.GetFieldActive( i)); } count = top.fie... |
AddFieldToList( gListbox, top.fieldMap.GetFieldDescription( i), i, false); | AddFieldToList(top.fieldMap.GetFieldDescription( i), i, false); | function ListFields() { if (top.fieldMap == null) return; var count = top.fieldMap.mapSize; var index; var i; for (i = 0; i < count; i++) { index = top.fieldMap.GetFieldMap( i); AddFieldToList( gListbox, top.fieldMap.GetFieldDescription( index), index, top.fieldMap.GetFieldActive( i)); } count = top.fie... |
var count = top.importService.GetModuleCount( top.importType); for (var i = 0; i < count; i++) { AddModuleToList( top.importService.GetModuleName( top.importType, i), i); | var count = top.importService.GetModuleCount(top.importType); var i; var moduleArray = new Array(count); for (i = 0; i < count; i++) { moduleArray[i] = {name:top.importService.GetModuleName(top.importType, i), index:i }; } moduleArray.sort(CompareImportModuleName); for (i = 0; i < count; i++) { AddModuleToList(modu... | function ListModules() { if (top.importService == null) return; var body = document.getElementById( "bucketBody"); var max = body.childNodes.length - 1; while (max >= 0) { body.removeChild( body.childNodes[max]); max--; } var count = top.importService.GetModuleCount( top.importType); for (var i = 0; i <... |
doResultClick(selection); | return doResultClick(selection); | function listSelect(event){ var tree = document.getElementById("resultsList"); if (tree.view.selection.count != 1) return false; var selection = tree.contentView.getItemAtIndex(tree.currentIndex); doResultClick(selection);} |
document.getElementById('xs'+idx).src="testopia/img/"+status+"_small.gif"; | try{ var deps = fields[3]; ids = deps.split(","); for (var i=0; i<ids.length; i++){ if (status == 'FAILED') document.getElementById('xs'+ids[i]).src="testopia/img/BLOCKED_small.gif"; else document.getElementById('xs'+ids[i]).src="testopia/img/IDLE_small.gif"; } } catch (e){} document.getElementById('xs'+cid).src="testo... | load: function(type, data, evt){ fillrow(data, idx); var fields = data.split("|"); var status = fields[0]; var closed = fields[1]; var tested = fields[2]; document.getElementById('xs'+idx).src="testopia/img/"+status+"_small.gif"; document.getElementById('tdb'+idx).innerHTML = tested; do... |
active_charsets.selectItem(item); active_charsets.ensureElementIsVisible(item); | function LoadActiveCharSets(){ var active_charsets = document.getElementById('active_charsets'); var active_charsets_treeroot = document.getElementById('active_charsets_root'); var visible; //var charsets_pref_string = new String(); try { arrayOfPrefs = charsets_pref_string.split(', '); } catch (e... | |
if (i == 0) available_charsets.selectItem(item); available_charsets.ensureElementIsVisible(item); | if (i == 0) { } | function LoadAvailableCharSets(){ var available_charsets = document.getElementById('available_charsets'); var available_charsets_treeroot = document.getElementById('available_charsets_root'); var invisible = new String(); //if (confirm('Load available Charset Decoders ?')) { if (availCharsetList) for (i = ... |
item = available_charsets_treeroot.firstChild; if (item) try { available_charsets.selectItem(item); available_charsets.ensureElementIsVisible(item); } catch (ex) { dump("Not able to select first avail. charset.\n"); } | function LoadAvailableCharSets(){ var available_charsets = document.getElementById('available_charsets'); var available_charsets_treeroot = document.getElementById('available_charsets_root'); var invisible = new String(); //if (confirm('Load available Charset Decoders ?')) { if (availCharsetList) for (i = ... | |
charsetList = ccm.GetDecoderList(); | var charsetList = ccm.GetDecoderList(); | function LoadAvailableCharSets(){ try { var ccm = Components.classes['@mozilla.org/charset-converter-manager;1']; if (ccm) { ccm = ccm.getService(); ccm = ccm.QueryInterface(Components.interfaces.nsICharsetConverterManager2); charsetList = ccm.GetDecoderList(); charsetList = charsetList.Query... |
charsetList.sort; | function LoadAvailableCharSets(){ try { var ccm = Components.classes['@mozilla.org/charset-converter-manager;1']; if (ccm) { ccm = ccm.getService(); ccm = ccm.QueryInterface(Components.interfaces.nsICharsetConverterManager2); charsetList = ccm.GetDecoderList(); charsetList = charsetList.Query... | |
for (i = 0; i < charsetList.Count(); i++) | var atom; var str; var tit; var visible; for (var i = 0; i < charsetList.Count(); i++) | function LoadAvailableCharSets(){ try { var ccm = Components.classes['@mozilla.org/charset-converter-manager;1']; if (ccm) { ccm = ccm.getService(); ccm = ccm.QueryInterface(Components.interfaces.nsICharsetConverterManager2); charsetList = ccm.GetDecoderList(); charsetList = charsetList.Query... |
var browserTarget = BookmarksUtils.getBrowserTargetFromEvent(aEvent); | loadBookmarkBrowser: function (aEvent, aTarget, aDS) { var rSource = RDF.GetResource(aTarget.id); var selection = BookmarksUtils.getSelectionFromResource(rSource); var browserTarget = BookmarksUtils.getBrowserTargetFromEvent(aEvent); BookmarksCommand.openBookmark(selection, "current", aDS) } | |
var personalToolbar = document.getElementById("innermostBox"); | var personalToolbar = document.getElementById("NC:PersonalToolbarFolder"); | function LoadBookmarksCallback(){ try { if (!gBookmarksService) gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"] .getService(Components.interfaces.nsIBookmarksService); gBookmarksService.ReadBookmarks(); // tickle personal toolbar to lo... |
setDateFieldValue( "exception-dates-text", today ); | setDateFieldValue( "exception-dates-text", startDate ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode is "new or "edit" - show proper header var titleDataItem = null; if( "new" == args.mode ) ... |
var headerTitleItem = document.getElementById( "standard-dialog-title-text" ); headerTitleItem.setAttribute( "value" , titleString ); | setFieldValue( "standard-dialog-title-text", titleString ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... |
var tipNewItem = document.getElementById( "tip-new" ); var tipEditItem = document.getElementById( "tip-edit" ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... | |
tipNewItem.setAttribute( "collapsed", "false" ); tipEditItem.setAttribute( "collapsed", "true" ); | setFieldValue( "tip-new", false, "collapsed" ); setFieldValue( "tip-edit", true, "collapsed" ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... |
tipNewItem.setAttribute( "collapsed", "true" ); tipEditItem.setAttribute( "collapsed", "false" ); | setFieldValue( "tip-new", true, "collapsed" ); setFieldValue( "tip-edit", false, "collapsed" ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... |
setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "selected" ); setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "selected" ); | setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "checked" ); setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "checked" ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... |
gCategoryManager = args.CategoryManager; | if( args.CategoryManager ) gCategoryManager = args.CategoryManager; | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... |
var titleDataItem = null; | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... | |
var titleDataItem = document.getElementById( "data-event-title-new" ); | titleDataItem = document.getElementById( "data-event-title-new" ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... |
var titleDataItem = document.getElementById( "data-event-title-edit" ); | titleDataItem = document.getElementById( "data-event-title-edit" ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... |
Categories = new Array(); | var Categories = new Array(); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent = args.calendarEvent; // mode ... |
setFieldValue( "repeat-length-units", gEvent.recurUnits, "value" ); | setFieldValue( "repeat-length-units", gEvent.recurUnits ); | function loadCalendarEventDialog(){ // Get arguments, see description at top of file var args = window.arguments[0]; gMode = args.mode; //if( args.CategoryManager ) // gCategoryManager = args.CategoryManager; // remember function to call when OK is clicked gOnOkFunction = args.onOk; gEvent... |
opener.setCursor( "default" ); | opener.setCursor( "auto" ); | function loadCalendarPrintDialog(){ // load up the sent arguments. gArgs = window.arguments[0]; gStartDate = gArgs.selectedDate ; gSelectedEvents = gArgs.selectedEvents ; // set the date to the currently selected date document.getElementById( "start-date-picker" ).value = selectedDate; // start focus on title v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.