rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
jQuery.prototype.toggle = function(a,b) { return a && b ? this.click(function(e){ this.last = this.last == a ? b : a; | toggle: function(a,b) { return a && b ? this.click(function(e){ this.last = this.last == a ? b : a; e.preventDefault(); return this.last.apply( this, [e] ) || false; }) : | jQuery.prototype.toggle = function(a,b) { // If two functions are passed in, we're // toggling on a click return a && b ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return thi... |
e.preventDefault(); return this.last.apply( this, [e] ) || false; }) : this._toggle(); }; | this._toggle(); }, | jQuery.prototype.toggle = function(a,b) { // If two functions are passed in, we're // toggling on a click return a && b ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return thi... |
return a && b ? this.click(function(e){ | return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ | toggle: function(a,b) { // If two functions are passed in, we're // toggling on a click return a && b ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return this.last... |
this._toggle(); | this._toggle.apply( this, arguments ); | toggle: function(a,b) { // If two functions are passed in, we're // toggling on a click return a && b ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return this.last... |
return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d === '' ) $(this).show(); else $(this).hide(); }); }, | return this.each(function(){ var d = $.css(this,"display"); if ( d == "none" || d === "" ) $(this).show(); else $(this).hide(); }); }, | toggle: function() { return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d === '' ) $(this).show(); else $(this).hide(); }); }, |
sidebar.setAttribute('style','width: 0px'); | sidebar.setAttribute('style','visibility: hidden; width: 1px'); | function toggle_open_close() { var sidebar = document.getElementById('sidebarframe'); var grippy = document.getElementById('grippy'); if (is_sidebar_open) { // Close it sidebar.setAttribute('style','width: 0px'); sidebar.setAttribute('src','about:blank'); grippy.setAttribute('open',''); is_sidebar_op... |
sidebar.setAttribute('style', 'width:' + sidebar_width + 'px'); | dump("Open it\n"); sidebar.setAttribute('style', 'visibility: visible;width:' + sidebar_width + 'px'); | function toggle_open_close() { var sidebar = document.getElementById('sidebarframe'); var grippy = document.getElementById('grippy'); if (is_sidebar_open) { // Close it sidebar.setAttribute('style','width: 0px'); sidebar.setAttribute('src','about:blank'); grippy.setAttribute('open',''); is_sidebar_op... |
var message = gBrowser.getMessageForBrowser(gBrowser.selectedBrowser, "top"); gChromeState.messageOpen = !message.hidden; message.hidden = aHide; | var notificationBox = gBrowser.getNotificationBox(); gChromeState.notificationsOpen = !notificationBox.notificationsHidden; notificationBox.notificationsHidden = aHide; | function toggleAffectedChrome(aHide){ // chrome to toggle includes: // (*) menubar // (*) navigation bar // (*) bookmarks toolbar // (*) browser messages // (*) sidebar // (*) find bar // (*) statusbar var navToolbox = document.getElementById("navigator-toolbox"); navToolbox.hidden = aHide; if ... |
if (gChromeState.messageOpen) { var message = gBrowser.getMessageForBrowser(gBrowser.selectedBrowser, "top"); message.hidden = aHide; | if (gChromeState.notificationsOpen) { gBrowser.getNotificationBox().notificationsHidden = aHide; | function toggleAffectedChrome(aHide){ // chrome to toggle includes: // (*) menubar // (*) navigation bar // (*) bookmarks toolbar // (*) browser messages // (*) sidebar // (*) find bar // (*) statusbar var navToolbox = document.getElementById("navigator-toolbox"); navToolbox.hidden = aHide; if ... |
function toggleAll(itemname,state) { tmp = document.getElementsByTagName('div'); for (i=0;i<tmp.length;i++) { if (tmp[i].className == itemname) tmp[i].style.display = state; | function toggleAll(className,state) { var elems = document.getElementsByClassName(className); for (var i = 0; i < elems.length; i++) { elems[i].style.display = state; | function toggleAll(itemname,state) { tmp = document.getElementsByTagName('div'); for (i=0;i<tmp.length;i++) { if (tmp[i].className == itemname) tmp[i].style.display = state; }} |
function toggleAll(className,state) { | function toggleAll(className) { | function toggleAll(className,state) { var elems = document.getElementsByClassName(className); for (var i = 0; i < elems.length; i++) { elems[i].style.display = state; }} |
elems[i].style.display = state; | if (elems[i].style.display == 'block') { elems[i].style.display = 'none'; } else { elems[i].style.display = 'block'; } | function toggleAll(className,state) { var elems = document.getElementsByClassName(className); for (var i = 0; i < elems.length; i++) { elems[i].style.display = state; }} |
gBrowser.hideMessage(null, "top"); | gBrowser.getNotificationBox().removeCurrentNotification(); | toggleAllowPopupsForSite: function (aEvent) { var currentURI = gBrowser.selectedBrowser.webNavigation.currentURI; var pm = Components.classes["@mozilla.org/permissionmanager;1"] .getService(this._kIPM); var shouldBlock = aEvent.target.getAttribute("block") == "true"; var perm = shou... |
jQuery.class.remove(this,c); | jQuery.className.remove(this,c); | toggleClass: function(c) { return this.each(function(){ if (jQuery.hasWord(this,c)) jQuery.class.remove(this,c); else jQuery.class.add(this,c); }); }, |
jQuery.class.add(this,c); | jQuery.className.add(this,c); | toggleClass: function(c) { return this.each(function(){ if (jQuery.hasWord(this,c)) jQuery.class.remove(this,c); else jQuery.class.add(this,c); }); }, |
jQuery.className[ jQuery.className.has(this,a) ? "remove" : "add" ](this,c); | jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this,c); | toggleClass: function( c ){ jQuery.className[ jQuery.className.has(this,a) ? "remove" : "add" ](this,c); }, |
return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, | return this.each(function(){ if ($.hasWord(this,c)) $.class.remove(this,c); else $.class.add(this,c); }); }, | toggleClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, |
function toggleDisplay(id) | DWRUtil.toggleDisplay = function(id) | function toggleDisplay(id){ var ele = document.getElementById(id); if (ele.style.display == 'none') { ele.style.display = 'block'; } else { ele.style.display = 'none'; }} |
if (ele == null) { alert("toggleDisplay() can't find an element with id: " + id + "."); throw id; } | function toggleDisplay(id){ var ele = document.getElementById(id); if (ele.style.display == 'none') { ele.style.display = 'block'; } else { ele.style.display = 'none'; }} | |
gEditModeLabel.removeAttribute("hidden"); | gEditModeLabel.setAttribute("hidden",""); | function ToggleEditModeType(){ if (gIsHTMLEditor) { if (EditModeType == "text") { EditModeType = "image"; gNormalModeButton.setAttribute("value",""); gTagModeButton.setAttribute("value",""); gSourceModeButton.setAttribute("value",""); gPreviewModeButton.setAttribute("value",""); //... |
document.persist("NormalModeButton","type"); | function ToggleEditModeType(){ if (gIsHTMLEditor) { if (EditModeType == "text") { EditModeType = "image"; gNormalModeButton.setAttribute("value",""); gTagModeButton.setAttribute("value",""); gSourceModeButton.setAttribute("value",""); gPreviewModeButton.setAttribute("value",""); //... | |
if (shortNode.getAttribute("hide") == "true") | if (shortNode.getAttribute("collapsed") == "true") | function ToggleLongShortAddresses(shortDivID, longDivID){ var shortNode = document.getElementById(shortDivID); var longNode = document.getElementById(longDivID); // test to see which if short is already hidden... if (shortNode.getAttribute("hide") == "true") { hdrViewSetVisible(longNode, false); hdrViewSet... |
var endPos = nodeToReset.childNodes.length; var index = 0; var tempValue; while (index < endPos - 1) { tempValue = nodeToReset.childNodes[index].getAttribute("value"); nodeToReset.childNodes[index].setAttribute("value", ""); nodeToReset.childNodes[index].setAttribute("value", tempValue); index++; } | function ToggleLongShortAddresses(shortDivID, longDivID){ var shortNode = document.getElementById(shortDivID); var longNode = document.getElementById(longDivID); // test to see which if short is already hidden... if (shortNode.getAttribute("hide") == "true") { hdrViewSetVisible(longNode, false); hdrViewSet... | |
toggleNextActionListing: function() | toggleNextActionListing: function(event) | toggleNextActionListing: function() { itemsElem = todoItems.findItemsElem(this); containerElem = todoItems.findNearestParentByClassName(this, "container"); if (Element.visible(itemsElem)) { todoItems.collapseNextActionListing(this, itemsElem); contextCollapseCookieManager.setCookie(todoItems.bui... |
return false; | toggleNextActionListing: function() { itemsElem = todoItems.findItemsElem(this); containerElem = todoItems.findNearestParentByClassName(this, "container"); if (Element.visible(itemsElem)) { todoItems.collapseNextActionListing(this, itemsElem); contextCollapseCookieManager.setCookie(todoItems.bui... | |
dump("*** Removing Sidebar: " + container.firstChild); container.removeChild(container.firstChild); | function toggleOpenClose() { // Get the open width and update the pref state var pref = Components.classes['component://netscape/preferences']; if (pref) { pref = pref.getService(); } if (pref) { pref = pref.QueryInterface(Components.interfaces.nsIPref); } var width = 0; if (pref) { pref.SetBoolPref('si... | |
sidebar.setAttribute('style','width:' + width + 'px; visibility:visible'); sidebar.setAttribute('src',sidebarURI); dump("Opening sidebar..."); if (counter > 0) { var sidebar = document.createElement('html:iframe'); sidebar.setAttribute('src','resource:/res/rdf/sidebar-browser.xul'); sidebar.setAttribute('class','sideb... | sidebar.setAttribute('style', 'width:' + width + 'px; visibility:visible'); sidebar.setAttribute('src', sidebarURI); sidebar.setAttribute('class', 'sidebarframe'); sidebar.setAttribute('id', 'sidebarframe'); | function toggleOpenClose() { // Get the open width and update the pref state var pref = Components.classes['component://netscape/preferences']; if (pref) { pref = pref.getService(); } if (pref) { pref = pref.QueryInterface(Components.interfaces.nsIPref); } var width = 0; if (pref) { pref.SetBoolPref('si... |
counter++; | function toggleOpenClose() { // Get the open width and update the pref state var pref = Components.classes['component://netscape/preferences']; if (pref) { pref = pref.getService(); } if (pref) { pref = pref.QueryInterface(Components.interfaces.nsIPref); } var width = 0; if (pref) { pref.SetBoolPref('si... | |
if (!gReceiptOptionChanged) gReceiptOptionChanged = true; | function ToggleReturnReceipt(target){ var msgCompFields = gMsgCompose.compFields; if (msgCompFields) { msgCompFields.returnReceipt = ! msgCompFields.returnReceipt; target.setAttribute('checked', msgCompFields.returnReceipt); }} | |
out.println( "toggleTab" ); | function toggleTab( tab ){ out.println( "toggleTab" ); allisp = document.layers[ "allisp" ]; for ( i = tabIndex( tab ); i < allisp.layers.length; i++ ) { levelLayer = allisp.layers[ i ]; displayLayer = levelLayer.layers[ "levelDisplay" ]; controls = levelLayer.layers[ "control" ]; showLayer = controls.layers[ "sho... | |
out.println( "pageY: " + levelLayer.pageY ); | function toggleTab( tab ){ out.println( "toggleTab" ); allisp = document.layers[ "allisp" ]; for ( i = tabIndex( tab ); i < allisp.layers.length; i++ ) { levelLayer = allisp.layers[ i ]; displayLayer = levelLayer.layers[ "levelDisplay" ]; controls = levelLayer.layers[ "control" ]; showLayer = controls.layers[ "sho... | |
out.println( "OPENING" ); | function toggleTab( tab ){ out.println( "toggleTab" ); allisp = document.layers[ "allisp" ]; for ( i = tabIndex( tab ); i < allisp.layers.length; i++ ) { levelLayer = allisp.layers[ i ]; displayLayer = levelLayer.layers[ "levelDisplay" ]; controls = levelLayer.layers[ "control" ]; showLayer = controls.layers[ "sho... | |
out.println( "CLOSING" ); | function toggleTab( tab ){ out.println( "toggleTab" ); allisp = document.layers[ "allisp" ]; for ( i = tabIndex( tab ); i < allisp.layers.length; i++ ) { levelLayer = allisp.layers[ i ]; displayLayer = levelLayer.layers[ "levelDisplay" ]; controls = levelLayer.layers[ "control" ]; showLayer = controls.layers[ "sho... | |
onLoading:function(request){ Form.disable(checkboxForm); ensureVisibleWithEffectAppear(targetElemId); }, | onLoading:function(request){ Form.disable(checkboxForm); removeFlashNotice(); ensureVisibleWithEffectAppear(targetElemId); }, | function toggleTodoItemChecked(){ var itemContainerElem = findNearestParentByClassName(this, 'item-container'); var itemContainerElemId = itemContainerElem.getAttribute('id'); var checkboxForm = this.form; var markingAsDone = this.checked; var targetElemId = markingAsDone ? 'completed' : getMarkUndoneTargetElem().getAt... |
onComplete:function(request){ new Effect.Highlight(itemContainerElemId,{}); addOneAjaxToDoItemCheckmarkHandling($(itemContainerElemId)); hideContainerIfEmpty('new_actions'); }, | onComplete:function(request){ new Effect.Highlight(itemContainerElemId,{}); addOneAjaxToDoItemCheckmarkHandling($(itemContainerElemId)); }, | function toggleTodoItemChecked(){ var itemContainerElem = findNearestParentByClassName(this, 'item-container'); var itemContainerElemId = itemContainerElem.getAttribute('id'); var checkboxForm = this.form; var markingAsDone = this.checked; var targetElemId = markingAsDone ? 'completed' : getMarkUndoneTargetElem().getAt... |
var cwindowManager = Components.classes['component: | var cwindowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); | function toHistory(){ // Use a single sidebar history dialog var cwindowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService(); var iwindowManager = Components.interfaces.nsIWindowMediator; var windowManager = cwindowManager.QueryInterface(iwindowManager); var histor... |
var cwindowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); var iwindowManager = Components.interfaces.nsIWindowMediator; var windowManager = cwindowManager.QueryInterface(iwindowManager); var historyWindow = windowManager.getMostRecentWindow('history:manager'); if (historyWindow... | toOpenWindowByType("history:manager", "chrome: | function toHistory(){ // Use a single sidebar history dialog var cwindowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); var iwindowManager = Components.interfaces.nsIWindowMediator; var windowManager = cwindowManager.QueryInterface(iwindowManager); var historyWindow = windowM... |
gJVMMgr.ShowJavaConsole(); | gJVMMgr.showJavaConsole(); | function toJavaConsole(){ gJVMMgr.ShowJavaConsole();} |
Components.classes['component: | Components.classes['@mozilla.org/oji/jvm-mgr;1']; | function toJavaConsole(){ try{ var cid = Components.classes['component://netscape/oji/jvm-mgr']; var iid = Components.interfaces.nsIJVMManager; var jvmMgr = cid.getService(iid); jvmMgr.ShowJavaConsole(); } catch(e) { }} |
try{ var cid = Components.classes['@mozilla.org/oji/jvm-mgr;1']; var iid = Components.interfaces.nsIJVMManager; var jvmMgr = cid.getService(iid); jvmMgr.ShowJavaConsole(); } catch(e) { } | gJVMMgr.ShowJavaConsole(); | function toJavaConsole(){ try{ var cid = Components.classes['@mozilla.org/oji/jvm-mgr;1']; var iid = Components.interfaces.nsIJVMManager; var jvmMgr = cid.getService(iid); jvmMgr.ShowJavaConsole(); } catch(e) { }} |
gJVMMgr.showJavaConsole(); | var jvmMgr = Components.classes['@mozilla.org/oji/jvm-mgr;1'] .getService(Components.interfaces.nsIJVMManager) jvmMgr.showJavaConsole(); | function toJavaConsole(){ gJVMMgr.showJavaConsole();} |
CycleWindow('navigator:browser', 'chrome: | CycleWindow('navigator:browser', getBrowserURL()); | function toNavigator(){ CycleWindow('navigator:browser', 'chrome://navigator/content/navigator.xul');} |
var sidebarButton = document.getElementById("sidebar-button"); | var sidebarButton = document.getElementById("help-sidebar-button"); | function ToolboxCustomizeDone(aToolboxChanged){# Update global UI elements that may have been added or removed var customizePopup = document.getElementById("cmd_CustomizeToolbars"); customizePopup.removeAttribute("disabled");# make sure our toolbar buttons have the correct enabled state restored to them... if (this.... |
var windowManager = Components.classes['component: | var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); | function toOpenWindowByType( inType, uri ){ var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService(); var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator); var topWindow = windowManagerInterface.getMostRecentWindow( in... |
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); | if (uri in window) return; | function toOpenWindowByType( inType, uri ){ var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); var windowManagerInterface = windowManager.QueryInterface(nsIWindowMediator); var topWindow = windowManagerInterface.getMostRecentWindow( inType ); if ( topWindow ) toOpenWindow(... |
var windowManagerInterface = windowManager.QueryInterface(nsIWindowMediator); | var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(nsIWindowMediator); | function toOpenWindowByType( inType, uri ){ var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); var windowManagerInterface = windowManager.QueryInterface(nsIWindowMediator); var topWindow = windowManagerInterface.getMostRecentWindow( inType ); if ( topWindow ) toOpenWindow(... |
var topWindow = windowManagerInterface.getMostRecentWindow( inType ); if ( topWindow ) toOpenWindow(topWindow); else window.open(uri, "_blank", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar"); | var topWindow = windowManager.getMostRecentWindow( inType ); if ( topWindow ) toOpenWindow( topWindow ); else { function newWindowLoaded(event) { delete window[uri]; } window[uri] = window.openDialog(uri, "", "all,dialog=no"); window[uri].addEventListener("load", newWindowLoaded, false); } | function toOpenWindowByType( inType, uri ){ var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); var windowManagerInterface = windowManager.QueryInterface(nsIWindowMediator); var topWindow = windowManagerInterface.getMostRecentWindow( inType ); if ( topWindow ) toOpenWindow(... |
topWindow.focus(); | toOpenWindow(topWindow); | function toOpenWindowByType( inType, uri ){ var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); var windowManagerInterface = windowManager.QueryInterface(nsIWindowMediator); var topWindow = windowManagerInterface.getMostRecentWindow( inType ); if ( topWindow ) topWindow.foc... |
window.open(uri, "", "chrome,menubar,toolbar,resizable"); | window.open(uri, "", "chrome,menubar"); | function toOpenWindowByType( inType, uri ){ var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService(); var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator); var topWindow = windowManagerInterface.GetMostRecentWindow( in... |
this._treeView.changeAmount += amount; | if ("changeAmount" in this._treeView) this._treeView.changeAmount += amount; else this._treeView.changeAmount = amount; | function torr_vfpchange (start, amount){ if (!this._treeView.frozen) { this.invalidateCache(); this.visualFootprint += amount; if ("_treeView" in this && "outliner" in this._treeView) { if (amount != 0) this._treeView.outliner.rowCountChanged (start, amount); ... |
var si = Components.classes["component: | var si = Components.classes["@mozilla.org/scriptableinputstream;1"]; | function toScriptableInputStream (i){ var si = Components.classes["component://netscape/scriptableinputstream"]; si = si.createInstance(); si = si.QueryInterface(Components.interfaces.nsIScriptableInputStream); si.init(i); return si; } |
'component: | '@mozilla.org/scriptableinputstream;1', | function toScriptableStream(input) { var SIStream = Components.Constructor( 'component://netscape/scriptableinputstream', 'nsIScriptableInputStream', 'init'); return new SIStream(input);} |
var t = tokens[this.type]; var s = "{\n" + INDENTATION.repeat(n) + "type: " + tokenstr(t); | var s = "{\n" + INDENTATION.repeat(n) + "type: " + tokenstr(this.type); | Np.toString = function () { var a = []; for (var i in this) { if (this.hasOwnProperty(i) && i != 'type') a.push({id: i, value: this[i]}); } a.sort(function (a,b) { return (a.id < b.id) ? -1 : 1; }); const INDENTATION = " "; var n = ++Node.indentLevel; var t = tokens[this.type];... |
var s = "{\n" + INDENTATION.repeat(n) + "type: " + (/^\W/.test(t) ? opTypeNames[t] : t.toUpperCase()); | var s = "{\n" + INDENTATION.repeat(n) + "type: " + tokenstr(t); | Np.toString = function () { var a = []; for (var i in this) { if (this.hasOwnProperty(i) && i != 'type') a.push({id: i, value: this[i]}); } a.sort(function (a,b) { return (a.id < b.id) ? -1 : 1; }); const INDENTATION = " "; var n = ++Node.indentLevel; var t = tokens[this.type];... |
if (client.CHARSET.search(/iso-2022/i) != -1) client.ucConverter.ConvertToUnicode("\x1B(B"); msg = client.ucConverter.ConvertToUnicode(msg); if (client.CHARSET.search(/iso-2022/i) != -1) client.ucConverter.ConvertToUnicode("\x1B(B"); return msg | client.ucConverter.charset = client.CHARSET; return client.ucConverter.ConvertToUnicode(msg); | function toUnicode (msg){ if (!("ucConverter" in client)) return msg; /* if we're in a stateful charset, return to ascii mode before starting */ if (client.CHARSET.search(/iso-2022/i) != -1) client.ucConverter.ConvertToUnicode("\x1B(B"); msg = client.ucConverter.ConvertToUnicode(msg); /... |
if (--this.frozen == 0) | if (--this.frozen == 0 && "changeStart" in this) | function tov_thaw (){ if (this.frozen == 0) { ASSERT (0, "not frozen"); return; } if (--this.frozen == 0) { this.childData.onVisualFootprintChanged(this.changeStart, this.changeAmount); } if ("needsResort" in this) { thi... |
var parent = this.parentRecord | if (!("parentRecord" in this)) return null; var parent = this.parentRecord; | function tovr_gettree (){ var parent = this.parentRecord while (parent) { if ("_treeView" in parent) return parent._treeView; parent = parent.parentRecord } return null;} |
parent = parent.parentRecord | if ("parentRecord" in parent) parent = parent.parentRecord; else parent = null; | function tovr_gettree (){ var parent = this.parentRecord while (parent) { if ("_treeView" in parent) return parent._treeView; parent = parent.parentRecord } return null;} |
this.parentRecord.onVisualFootprintChanged (row, -this.visualFootprint); | if ("parentRecord" in this) this.parentRecord.onVisualFootprintChanged (row, -this.visualFootprint); | function tovr_hide (){ if (this.isHidden) return; /* get the row before hiding */ var row = this.calculateVisualRow(); this.invalidateCache(); this.isHidden = true; /* go right to the parent so we don't muck with our own visualFoorptint * record, we'll need it to be correct if we're ever un... |
if (!ASSERT(this.childData.length, "removing from empty childData")) return; | function tovr_remchild (index){ for (var i = index + 1; i < this.childData.length; ++i) --this.childData[i].childIndex; var fpDelta = -this.childData[index].visualFootprint; var changeStart = this.childData[index].calculateVisualRow(); this.childData[index].childIndex = -1; delete this.childDa... | |
return this._toXML(aNode, 0); | if (typeof XMLSerializer != "undefined") return (new XMLSerializer()).serializeToString(aNode); else return this._toXML(aNode, 0); | toXML: function(aNode) { return this._toXML(aNode, 0); }, |
var targetURI = window.content.location.href; | var targetURI = window._content.location.href; | function Translate() { var service = "http://cgi.netscape.com/cgi-bin/translate.cgi?AlisUI=simple_frames/ns_home"; // if we're already viewing a translated page, then just get the // last argument (which we expect to always be "AlisTargetURI") var targetURI = window.content.location.href; var targetURIIndex = target... |
var targetURI = _content.location.href; | var targetURI = getWebNavigation().currentURI.spec; | function Translate(){ var service = pref.getCharPref("browser.translation.service"); var serviceDomain = pref.getCharPref("browser.translation.serviceDomain"); // XXX This somehow causes a big leak, back to the old way // till we figure out why. See bug 61886. // var targetURI = getWebNavigation().currentURI... |
if (appCore) appCore.loadUrl(service); else dump("BrowserAppCore is not initialised\n"); | loadURI(service); | function Translate() { var service = "http://cgi.netscape.com/cgi-bin/translate.cgi?AlisUI=simple_frames/ns_home"; // if we're already viewing a translated page, then just get the // last argument (which we expect to always be "AlisTargetURI") var targetURI = window._content.location.href; var targetURIIndex = targe... |
var service = pref.getCharPref("browser.translation.service"); var serviceDomain = pref.getCharPref("browser.translation.serviceDomain"); | var service = pref.getComplexValue("browser.translation.service", Components.interfaces.nsIPrefLocalizedString).data; var serviceDomain = pref.getComplexValue("browser.translation.serviceDomain", Components.interfaces.nsIPrefLocalizedString).data; | function Translate(){ var service = pref.getCharPref("browser.translation.service"); var serviceDomain = pref.getCharPref("browser.translation.serviceDomain"); var targetURI = getWebNavigation().currentURI.spec; // if we're already viewing a translated page, then just reload if (targetURI.indexOf(serviceDomain) >=... |
*/ | treeClicked: function (aEvent) { if (this.tree.selectedItems.length > 1 || aEvent.detail > 1 || aEvent.button != 0) { gSelectionTracker.clickCount = 0; return; } if (gSelectionTracker.currentItem == this.tree.currentItem && gSelectionTracker.currentCell == aEvent.target) ++gSelectionTr... | |
else if (aEvent.keyCode == 113) | else */ if (aEvent.keyCode == 113) | treeKeyPress: function (aEvent) { if (this.tree.selectedItems.length > 1) return; if (aEvent.keyCode == 113 && aEvent.shiftKey) { const kNodeId = NODE_ID(this.tree.currentItem); if (this.resolveType(kNodeId) == NC_NS + "Bookmark") gBookmarksShell.commands.editCell (this.tree.currentItem, 1); ... |
else if (aEvent.keyCode == 13 && this.tree.currentItem.firstChild.getAttribute("inline-edit") != "true") | else if (aEvent.keyCode == 13) | treeKeyPress: function (aEvent) { if (this.tree.selectedItems.length > 1) return; if (aEvent.keyCode == 113 && aEvent.shiftKey) { const kNodeId = NODE_ID(this.tree.currentItem); if (this.resolveType(kNodeId) == NC_NS + "Bookmark") gBookmarksShell.commands.editCell (this.tree.currentItem, 1); ... |
const kNodeID = NODE_ID(this.tree.currentItem); | const kNodeId = NODE_ID(this.tree.currentItem); | treeKeyPress: function (aEvent) { if (this.tree.selectedItems.length > 1) return; if (aEvent.keyCode == 113 && aEvent.shiftKey) { const kNodeID = NODE_ID(this.tree.currentItem); if (this.resolveType(kNodeId) == NC_NS + "Bookmark") gBookmarksShell.commands.editCell (this.tree.currentItem, 1); ... |
TreeView_ToggleExpand (idArray[0], idArray[1]); | function TreeView_PopulateCallback (data, ids){ var idArray = ids.split (" "); var tree = getTree (idArray[0]); var spanId = idArray[0] + "_" + idArray[1]; var node = document.getElementById (spanId); node.populated = true; if (data != "*") { node.innerHTML = data; TreeView_ToggleExpand (idArray[0], idArray[1]); } el... | |
TreeView_ToggleExpand (idArray[0], idArray[1]); | function TreeView_PopulateCallback (data, ids){ var idArray = ids.split (" "); var tree = getTree (idArray[0]); var spanId = idArray[0] + "_" + idArray[1]; var node = document.getElementById (spanId); node.populated = true; if (data != "*") { node.innerHTML = data; TreeView_ToggleExpand (idArray[0], idArray[1]); } el... | |
var node = document.getElementById (treeId + "_" + nodeId); | var tree = getTree (treeId); var spanId = treeId + "_" + nodeId; var node = document.getElementById (spanId); | function TreeView_ToggleExpand (treeId, nodeId) { var node = document.getElementById (treeId + "_" + nodeId); var expand = node.style.display == "none"; node.style.display = expand ? "block" : "none"; var inputStates = document.forms[0][treeId + "_ExpandStates"]; var states = inputStates.value; var i = states.indexOf ... |
var states = inputStates.value; var i = states.indexOf ("|" + nodeId + "|"); if (node.style.display == "none") states = states.replace ("|" + nodeId + "|", "|"); else states = states + nodeId + "|"; inputStates.value = states; | TreeView_SetNodeFlag (inputStates, nodeId, expand); | function TreeView_ToggleExpand (treeId, nodeId) { var node = document.getElementById (treeId + "_" + nodeId); var expand = node.style.display == "none"; node.style.display = expand ? "block" : "none"; var inputStates = document.forms[0][treeId + "_ExpandStates"]; var states = inputStates.value; var i = states.indexOf ... |
var tree = eval (treeId + "_data"); | function TreeView_ToggleExpand (treeId, nodeId) { var node = document.getElementById (treeId + "_" + nodeId); var expand = node.style.display == "none"; node.style.display = expand ? "block" : "none"; var inputStates = document.forms[0][treeId + "_ExpandStates"]; var states = inputStates.value; var i = states.indexOf ... | |
var image = document.getElementById (treeId + "_img_" + nodeId); | var image = document.getElementById (spanId + "_img"); | function TreeView_ToggleExpand (treeId, nodeId) { var node = document.getElementById (treeId + "_" + nodeId); var expand = node.style.display == "none"; node.style.display = expand ? "block" : "none"; var inputStates = document.forms[0][treeId + "_ExpandStates"]; var states = inputStates.value; var i = states.indexOf ... |
var alt; if (expand) alt = tree.collapseAlt; else alt = tree.expandAlt; if (alt.indexOf ("{0}") != -1) { var txt = document.getElementById (spanId + "_txt").innerText; alt = alt.replace ("{0}", txt); } image.alt = alt; | function TreeView_ToggleExpand (treeId, nodeId) { var node = document.getElementById (treeId + "_" + nodeId); var expand = node.style.display == "none"; node.style.display = expand ? "block" : "none"; var inputStates = document.forms[0][treeId + "_ExpandStates"]; var states = inputStates.value; var i = states.indexOf ... | |
trigger: function( type ) { jQuery.event.trigger( this, type ); | trigger: function( type, data ) { jQuery.event.trigger( type, data, this ); | trigger: function( type ) { jQuery.event.trigger( this, type ); } |
data = data || [{ type: type }]; | data = data || [ $.event.fix({ type: type }) ]; | $.event.trigger = function(element,type,data) { data = data || [{ type: type }]; if ( element && element["on" + type] ) { $.apply( element, element["on" + type], data ); }}; |
if ( element && element["on" + type] ) { $.apply( element, element["on" + type], data ); } | if ( element && element["on" + type] ) element["on" + type].apply( element, data ); | $.event.trigger = function(element,type,data) { data = data || [ $.event.fix({ type: type }) ]; if ( element && element["on" + type] ) { $.apply( element, element["on" + type], data ); }}; |
return this.replace(/^\s+/, '').replace(/\s+$/, ''); | return this.replace(/^\s+|\s+$/, ''); | String.prototype.trim = function() { return this.replace(/^\s+/, '').replace(/\s+$/, '');}; |
if (string.length > maxLength) string = string.slice(0, maxLength); | function TruncateStringAtWordEnd(string, maxLength, addEllipses){ // Return empty if string is null, undefined, or the empty string if (!string) return ""; // We assume they probably don't want whitespace at the beginning string = string.replace(/^\s+/, ''); if (string.length <= maxLength) retu... | |
HideMenu(menu) | HideMenu(menu); | function TryHideMenu(menu,CountHide) { if (CountHide != MenuCountHide) { return; } HideMenu(menu)} |
print("In finally case of testThis() function"); | print("In finally case of tryThis() function"); | function tryThis(){ var sum = 4 ; var i = 0; while (sum < 10) { try { sum += 1; i += 1; } finally { print("In finally case of testThis() function"); } } return i;} |
if ( window.content ) { | if ( window._content ) { | function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { dump("Setting content window\n"); appCore.setContentWindow( window.content ); // Have browser app core load appropriate initial page./* sspitzer: I think this code is unnecessary, but I'll leave it ... |
appCore.setContentWindow( window.content ); | appCore.setContentWindow( window._content ); | function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { dump("Setting content window\n"); appCore.setContentWindow( window.content ); // Have browser app core load appropriate initial page./* sspitzer: I think this code is unnecessary, but I'll leave it ... |
var startpage = "about:"; | var startpage = "about:blank"; | function tryToSetContentWindow() { if ( window.frames[0].frames[1] ) { dump("Setting content window\n"); appCore.setContentWindow( window.frames[0].frames[1] ); // Have browser app core load appropriate initial page. if ( !explicitURL ) { var pref = Components.classes['compon... |
case 3: startpage = pref.CopyCharPref("browser.startup.splash"); break; | function tryToSetContentWindow() { if ( window.frames[0].frames[1] ) { dump("Setting content window\n"); appCore.setContentWindow( window.frames[0].frames[1] ); // Have browser app core load appropriate initial page. if ( !explicitURL ) { var pref = Components.classes['compon... | |
startpage = "about:"; | startpage = "about:blank"; | function tryToSetContentWindow() { if ( window.frames[0].frames[1] ) { dump("Setting content window\n"); appCore.setContentWindow( window.frames[0].frames[1] ); // Have browser app core load appropriate initial page. if ( !explicitURL ) { var pref = Components.classes['compon... |
var handler = Components.classes['component: | var handler = Components.classes['@mozilla.org/commandlinehandler/general-startup;1?type=browser']; | function tryToSetContentWindow() { var startpage = startPageDefault; if ( window._content ) { dump("Setting content window\n"); appCore.setContentWindow( window._content ); // Have browser app core load appropriate initial page./* sspitzer: I think this code is unnecessary, but I'll leave i... |
xsltProcessor = Components.classes["component: | xsltProcessor = Components.classes["@mozilla.org/document-transformer;1?type=text/xsl"].getService(); | function tryToTransform() { if (xmlLoaded && xslLoaded) { try { var xsltProcessor = null; var xmlDocumentNode = xmlDocument.documentElement; var xslDocumentNode = xslDocument.documentElement; xsltProcessor = Components.classes["component://netscape/document-transformer?type=text/xsl"].getS... |
if (name.indexOf("X-MOZ-") == 0) { this.log( "tunneling " + name ); | if (name != "X-MOZ-VALARM-LASTACK" && name.indexOf("X-MOZ-") == 0) { if (LOG_LEVEL > 1) this.log( "tunneling " + name ); | calWcapCalendar.prototype.tunnelXProps = function( destItem, srcItem ){ var enum = srcItem.propertyEnumerator; while (enum.hasMoreElements()) { var prop = enum.getNext().QueryInterface( Components.interfaces.nsIProperty); var name = prop.name; if (name.indexOf("X-MOZ-") == 0) { ... |
return intSortFunction(x.typeCol, y.typeCol); | if (x.typeCol != y.typeCol) return gSortDirection * (y.typeCol - x.typeCol); return prefColSortFunction(x, y); | function typeColSortFunction(x,y){ return intSortFunction(x.typeCol, y.typeCol);} |
if (this.messages) | if ("messages" in this) | function u_display(message, msgtype, sourceObj, destObj){ if (this.messages) this.displayHere (message, msgtype, sourceObj, destObj); else { var o = getObjectDetails(client.currentObject); if (o.server.connection.isConnected && o.network == this.parent.parent && clien... |
var mimeSource = gRDF.GetResource(aMIMEString); var valueProperty = gRDF.GetResource(NC_RDF(aPropertyString)); | var mimeSource = gRDF.GetUnicodeResource(aMIMEString); var valueProperty = gRDF.GetUnicodeResource(NC_RDF(aPropertyString)); | function unassertMIMEStuff(aMIMEString, aPropertyString, aValueString){ var mimeSource = gRDF.GetResource(aMIMEString); var valueProperty = gRDF.GetResource(NC_RDF(aPropertyString)); var mimeLiteral = gRDF.GetLiteral(aValueString); gDS.Unassert(mimeSource, valueProperty, mimeLiteral, true);} |
ss.undoCloseTab(window, aIndex); | ss.undoCloseTab(window, aIndex || 0); | function undoCloseTab(aIndex) { var ss = Cc["@mozilla.org/browser/sessionstore;1"]. getService(Ci.nsISessionStore); ss.undoCloseTab(window, aIndex);} |
if (this.attr) this.subject.setAttribute(this.attr.nodeName, this.previousValue); | if (this.attr) { if (this.previousNamespaceURI == this.newNamespaceURI) { this.subject.setAttributeNS(this.previousNamespaceURI, this.attr.nodeName, this.previousValue); } else { this.subject.removeAttributeNS(this.newNamespaceURI, this.attr.localName); this.subject.setAttributeNS(this.previousNamespaceURI, this.attr.n... | undoCommand: function() { if (this.attr) this.subject.setAttribute(this.attr.nodeName, this.previousValue); } |
undoTransaction : function () {}, | undoTransaction: function () { dump("undo ") dumpTXN(this) for (var i=this.item.length-1; i>=0; i--) { if (this.isValid[i]) { this.RDFC.Init(this.BMDS, this.parent[i]); this.RDFC.RemoveElementAt(this.index[i], true); } } }, | undoTransaction : function () {}, |
if (this.isValid[i]) { this.RDFC.Init(this.BMDS, this.parent[i]); this.RDFC.RemoveElementAt(this.index[i], true); } | this.RDFC.Init(this.BMDS, this.parent[i]); this.RDFC.RemoveElementAt(this.index[i], true); | undoTransaction: function () { this.beginUpdateBatch(); for (var i=this.item.length-1; i>=0; i--) { if (this.isValid[i]) { this.RDFC.Init(this.BMDS, this.parent[i]); this.RDFC.RemoveElementAt(this.index[i], true); } } this.endUpdateBatch(); }, |
const entityVersion = Components.interfaces.nsIEntityConverter.html40 | Components.interfaces.nsIEntityConverter.mathml20; | const entityVersion = Components.interfaces.nsIEntityConverter.entityW3C; | function unicodeTOentity(text){ const charTable = { '&': '&<span class="entity">amp;</span>', '<': '&<span class="entity">lt;</span>', '>': '&<span class="entity">gt;</span>', '"': '&<span class="entity">quot;</span>' }; function charTableLookup(letter) { return charTable[letter]; } ... |
editEvent( calendarEvent.parentItem ); | editEvent(calendarEvent); | function unifinderDoubleClickEvent( event ){ // we only care about button 0 (left click) events if (event.button != 0) return; // find event by id var calendarEvent = getCalendarEventFromEvent( event ); if( calendarEvent != null ) editEvent( calendarEvent.parentItem ); else newEvent(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.