rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll );
|
SetElementEnabledById( "spacingLabel", canEnableAll ); SetElementEnabledById( "imageleftrightInput", canEnableAll ); SetElementEnabledById( "leftrightLabel", canEnableAll ); SetElementEnabledById( "leftrighttypeLabel", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll );
|
SetElementEnabledById( "imagetopbottomInput", canEnableAll ); SetElementEnabledById( "topbottomLabel", canEnableAll ); SetElementEnabledById( "topbottomtypeLabel", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll );
|
SetElementEnabledById( "border", canEnableAll ); SetElementEnabledById( "borderLabel", canEnableAll ); SetElementEnabledById( "bordertypeLabel", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll );
|
SetElementEnabledById( "AdvancedEditButton2", canEnableAll ); SetElementEnabledById( "AdvancedEditButton3", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
SetElementEnabledByID( "editImageMap", canEnableAll );
|
SetElementEnabledById( "editImageMap", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);
|
SetElementEnabledById( "removeImageMap", canEnableAll && canRemoveImageMap);
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
SetElementEnabledById( "editImageMap", canEnableOk );
|
function doOverallEnabling(){ var canEnableOk = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableOk ) return; wasEnableAll = canEnableOk; SetElementEnabledById("ok", canEnableOk ); SetElementEnabledById( "imagemapLabel", canEnableOk ); SetElementEnabledById( "editImageMap", canEnableOk ); SetElementEnabledById( "removeImageMap", canRemoveImageMap);}
|
|
SetElementEnabledByID("image.altTextInput", canEnableAll ); SetElementEnabledByID("AdvancedButton", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll; canEnableAll = (dialog.srcInput.value.length > 0); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; btn = document.getElementById("OK"); if ( btn ) { btn.disabled = (!canEnableAll && hasAnyChanged); } fieldset = document.getElementById("imagedimensionsFieldset"); if ( fieldset ) { SetElementEnabledByID("imagedimensionsFieldset", canEnableAll ); doDimensionEnabling( canEnableAll ); } // commented out since it asserts right now// SetLabelEnabledByID( "imagealignmentLabel", canEnableAll ); SetElementEnabledByID("image.alignType", canEnableAll ); // spacing fieldset SetElementEnabledByID("spacing.fieldset", canEnableAll ); SetElementEnabledByID("imageleftrightInput", canEnableAll ); SetElementEnabledByID("imagetopbottomInput", canEnableAll ); SetElementEnabledByID("imageborderInput", canEnableAll ); // do spacing labels // commented out since they all assert right now// SetLabelEnabledByID( "leftrightLabel", canEnableAll );// SetLabelEnabledByID( "leftrighttypeLabel", canEnableAll );// SetLabelEnabledByID( "topbottomLabel", canEnableAll );// SetLabelEnabledByID( "topbottomtypeLabel", canEnableAll );// SetLabelEnabledByID( "borderLabel", canEnableAll );// SetLabelEnabledByID( "bordertypeLabel", canEnableAll );}
|
|
var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false"));
|
var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return false; var select_list = treeNode.selectedItems; if (!select_list) return false; if (select_list.length != 1) return false; var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = (select_list[0].getAttribute("container") == "true"); debug("Container status: " + ((isContainerFlag) ? "true" : "false"));
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
var clip = Components.classes["component: if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false);
|
var clip_uri = "component: var clip = Components.classes[clip_uri].createInstance(); if (clip) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return false;
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
var trans = Components.classes["component: if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem");
|
var trans_uri = "component: var trans = Components.classes[trans_uri].createInstance(); if (trans) { trans = trans.QueryInterface(Components.interfaces.nsITransferable); } if (!trans) return false; trans.addDataFlavor("moz/bookmarkclipboarditem");
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); if (!url) return(false);
|
clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) { var data_interface = Components.interfaces.nsISupportsWString data = data.value.QueryInterface(data_interface); } var url = null; if (data) url = data.data.substring(0, dataLen.value / 2); if (!url) return false;
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
var strings = url.split(";"); if (!strings) return(false);
|
var strings = url.split(";"); if (!strings) return false;
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
var RDF = Components.classes["component: RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component: RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false);
|
var rdf_uri = "component: var RDF = Components.classes[rdf_uri].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return false; var rdfc_uri = "component: var RDFC = Components.classes[rdfc_uri].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return false; var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return false;
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
var nameRes = RDF.GetResource("http: if (!nameRes) return(false);
|
var nameRes = RDF.GetResource(NC + "Name"); if (!nameRes) return false;
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes);
|
pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return false; var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) { parID = select_list[0].parentNode.parentNode.getAttribute("id"); } if (!parID) return false; pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return false; } RDFC.Init(Bookmarks, pasteContainerRes);
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); }
|
if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return false; }
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
var dirty = false;
|
var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName);
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName);
|
var IDRes = RDF.GetResource(theID); if (!IDRes) continue;
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);
|
if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var rdf_ds_interface = Components.interfaces.nsIRDFRemoteDataSource; var remote = Bookmarks.QueryInterface(rdf_ds_interface); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return true;
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
clip.getData(trans);
|
clip.getData(trans, Components.interfaces.nsIClipboard.kGlobalClipboard);
|
function doPaste(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); var select_list = treeNode.selectedItems; if (!select_list) return(false); if (select_list.length != 1) return(false); var pasteNodeID = select_list[0].getAttribute("id"); debug("Paste onto " + pasteNodeID); var isContainerFlag = select_list[0].getAttribute("container") == "true" ? true:false; debug("Container status: " + ((isContainerFlag) ? "true" : "false")); var clip = Components.classes["component://netscape/widget/clipboard"].createInstance(); if ( clip ) clip = clip.QueryInterface(Components.interfaces.nsIClipboard); if (!clip) return(false); var trans = Components.classes["component://netscape/widget/transferable"].createInstance(); if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable); if ( !trans ) return(false); trans.addDataFlavor("moz/bookmarkclipboarditem"); clip.getData(trans); var data = new Object(); var dataLen = new Object(); trans.getTransferData("moz/bookmarkclipboarditem", data, dataLen); if (data) data = data.value.QueryInterface(Components.interfaces.nsISupportsWString); var url=null; if (data) url = data.data.substring(0, dataLen.value / 2); // double byte data if (!url) return(false); var strings = url.split(";"); if (!strings) return(false); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var RDFC = Components.classes["component://netscape/rdf/container"].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return(false); var Bookmarks = RDF.GetDataSource("rdf:bookmarks"); if (!Bookmarks) return(false); var nameRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Name"); if (!nameRes) return(false); pasteNodeRes = RDF.GetResource(pasteNodeID); if (!pasteNodeRes) return(false); var pasteContainerRes = null; var pasteNodeIndex = -1; if (isContainerFlag == true) { pasteContainerRes = pasteNodeRes; } else { var parID = select_list[0].parentNode.parentNode.getAttribute("ref"); if (!parID) parID = select_list[0].parentNode.parentNode.getAttribute("id"); if (!parID) return(false); pasteContainerRes = RDF.GetResource(parID); if (!pasteContainerRes) return(false); } RDFC.Init(Bookmarks, pasteContainerRes); debug("Inited RDFC"); if (isContainerFlag == false) { pasteNodeIndex = RDFC.IndexOf(pasteNodeRes); if (pasteNodeIndex < 0) return(false); // how did that happen? } debug("Loop over strings"); var dirty = false; for (var x=0; x<strings.length; x=x+2) { var theID = strings[x]; var theName = strings[x+1]; if ((theID.indexOf("ID:{") == 0) && (theName.indexOf("NAME:{") == 0)) { theID = theID.substr(4, theID.length-5); theName = theName.substr(6, theName.length-7); debug("Paste ID: " + theID + " NAME: " + theName); var IDRes = RDF.GetResource(theID); if (!IDRes) continue; if (RDFC.IndexOf(IDRes) > 0) { debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } if (theName != "") { var NameLiteral = RDF.GetLiteral(theName); if (NameLiteral) { Bookmarks.Assert(IDRes, nameRes, NameLiteral, true); dirty = true; } } if (isContainerFlag == true) { RDFC.AppendElement(IDRes); debug("Appended node onto end of container"); } else { RDFC.InsertElementAt(IDRes, pasteNodeIndex++, true); debug("Pasted at index # " + pasteNodeIndex); } dirty = true; } } if (dirty == true) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) { remote.Flush(); debug("Wrote out bookmark changes."); } } return(true);}
|
dialog.pause.setAttribute("label", getString("pause"));
|
dialog.pauseResumeDeck.setAttribute("index", "1");
|
function doPauseButton() { if (dialog.downloadPaused) { // resume dialog.downloadPaused = false; dialog.pause.setAttribute("label", getString("pause")); dialog.request.resume() } else { // suspend dialog.downloadPaused = true; dialog.pause.setAttribute("label", getString("resume")); dialog.request.suspend() }}
|
dialog.pause.setAttribute("label", getString("resume"));
|
dialog.pauseResumeDeck.setAttribute("index", "2");
|
function doPauseButton() { if (dialog.downloadPaused) { // resume dialog.downloadPaused = false; dialog.pause.setAttribute("label", getString("pause")); dialog.request.resume() } else { // suspend dialog.downloadPaused = true; dialog.pause.setAttribute("label", getString("resume")); dialog.request.suspend() }}
|
var http = document.getElementById("networkProxyHTTP"); var httpPort = document.getElementById("networkProxyHTTP_Port"); var httpValue = http.value; var httpPortValue = httpPort.value; if (httpValue && httpPortValue && parseInt(httpPortValue) > 0) { var ftp = document.getElementById("networkProxyFTP"); var gopher = document.getElementById("networkProxyGopher"); var ssl = document.getElementById("networkProxySSL"); var ftpPort = document.getElementById("networkProxyFTP_Port"); var gopherPort = document.getElementById("networkProxyGopher_Port"); var sslPort = document.getElementById("networkProxySSL_Port"); ftp.value = httpValue; gopher.value = httpValue; ssl.value = httpValue; ftpPort.value = httpPortValue; gopherPort.value = httpPortValue; sslPort.value = httpPortValue; }
|
if (shareSettings.getAttribute("value") != "true") return; ftp.setAttribute("value", http.value); ssl.setAttribute("value", http.value); gopher.setAttribute("value", http.value); ftpPort.setAttribute("value", httpPort.value); sslPort.setAttribute("value", httpPort.value); gopherPort.setAttribute("value", httpPort.value);
|
function DoProxyCopy(){ var http = document.getElementById("networkProxyHTTP"); var httpPort = document.getElementById("networkProxyHTTP_Port"); var httpValue = http.value; var httpPortValue = httpPort.value; if (httpValue && httpPortValue && parseInt(httpPortValue) > 0) { var ftp = document.getElementById("networkProxyFTP"); var gopher = document.getElementById("networkProxyGopher"); var ssl = document.getElementById("networkProxySSL"); var ftpPort = document.getElementById("networkProxyFTP_Port"); var gopherPort = document.getElementById("networkProxyGopher_Port"); var sslPort = document.getElementById("networkProxySSL_Port"); ftp.value = httpValue; gopher.value = httpValue; ssl.value = httpValue; ftpPort.value = httpPortValue; gopherPort.value = httpPortValue; sslPort.value = httpPortValue; }}
|
var url = internetSearchStore.GetTarget(src, urlProperty, true); if (url) url = url.QueryInterface(Components.interfaces.nsIRDFLiteral); if (url) url = url.Value; if (url) { var statusNode = document.getElementById("status-button"); if (statusNode) { statusNode.setAttribute("value", url); } }
|
var url = internetSearchStore.GetTarget(src, urlProperty, true); if (url) url = url.QueryInterface(Components.interfaces.nsIRDFLiteral); if (url) url = url.Value; if (url) { var statusNode = document.getElementById("status-button"); if (statusNode) { statusNode.label = url; } }
|
function doResultClick(node){ var theID = node.id; if (!theID) return(false); try { var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(theID, true); var urlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true); var bannerProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Banner", true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); var url = internetSearchStore.GetTarget(src, urlProperty, true); if (url) url = url.QueryInterface(Components.interfaces.nsIRDFLiteral); if (url) url = url.Value; if (url) { var statusNode = document.getElementById("status-button"); if (statusNode) { statusNode.setAttribute("value", url); } } var banner = internetSearchStore.GetTarget(src, bannerProperty, true); if (banner) banner = banner.QueryInterface(Components.interfaces.nsIRDFLiteral); if (banner) banner = banner.Value; var target = internetSearchStore.GetTarget(src, htmlProperty, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) { var text = "<HTML><HEAD><TITLE>Search</TITLE><BASE TARGET='_top'></HEAD><BODY><FONT POINT-SIZE='9'>"; if (banner) text += banner + "</A><BR>"; // add a </A> and a <BR> just in case text += target; text += "</FONT></BODY></HTML>" var doc = frames[0].document; doc.open("text/html", "replace"); doc.writeln(text); doc.close(); } } } } catch(ex) { } return(true);}
|
var theID = node.getAttribute("id");
|
var theID = node.id;
|
function doResultClick(node){ var theID = node.getAttribute("id"); if (!theID) return(false); try { var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(theID, true); var urlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true); var bannerProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Banner", true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); var url = internetSearchStore.GetTarget(src, urlProperty, true); if (url) url = url.QueryInterface(Components.interfaces.nsIRDFLiteral); if (url) url = url.Value; if (url) { var statusNode = document.getElementById("status-button"); if (statusNode) { statusNode.setAttribute("value", url); } } var banner = internetSearchStore.GetTarget(src, bannerProperty, true); if (banner) banner = banner.QueryInterface(Components.interfaces.nsIRDFLiteral); if (banner) banner = banner.Value; var target = internetSearchStore.GetTarget(src, htmlProperty, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) { var text = "<HTML><HEAD><TITLE>Search</TITLE><BASE TARGET='_top'></HEAD><BODY><FONT POINT-SIZE='9'>"; if (banner) { // add a </A> and a <BR> just in case text += banner + "</A><BR>"; } text += target; text += "</FONT></BODY></HTML>" var doc = window.frames[0].document; doc.open("text/html", "replace"); doc.writeln(text); doc.close(); } } } } catch(ex) { } return(true);}
|
{ text += banner + "</A><BR>"; }
|
text += banner + "</A><BR>";
|
function doResultClick(node){ var theID = node.getAttribute("id"); if (!theID) return(false); try { var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(theID, true); var urlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true); var bannerProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Banner", true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); var url = internetSearchStore.GetTarget(src, urlProperty, true); if (url) url = url.QueryInterface(Components.interfaces.nsIRDFLiteral); if (url) url = url.Value; if (url) { var statusNode = document.getElementById("status-button"); if (statusNode) { statusNode.setAttribute("value", url); } } var banner = internetSearchStore.GetTarget(src, bannerProperty, true); if (banner) banner = banner.QueryInterface(Components.interfaces.nsIRDFLiteral); if (banner) banner = banner.Value; var target = internetSearchStore.GetTarget(src, htmlProperty, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) { var text = "<HTML><HEAD><TITLE>Search</TITLE><BASE TARGET='_top'></HEAD><BODY><FONT POINT-SIZE='9'>"; if (banner) { // add a </A> and a <BR> just in case text += banner + "</A><BR>"; } text += target; text += "</FONT></BODY></HTML>" var doc = window.frames[0].document; doc.open("text/html", "replace"); doc.writeln(text); doc.close(); } } } } catch(ex) { } return(true);}
|
var doc = window.frames[0].document;
|
var doc = frames[0].document;
|
function doResultClick(node){ var theID = node.getAttribute("id"); if (!theID) return(false); try { var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(theID, true); var urlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true); var bannerProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Banner", true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); var url = internetSearchStore.GetTarget(src, urlProperty, true); if (url) url = url.QueryInterface(Components.interfaces.nsIRDFLiteral); if (url) url = url.Value; if (url) { var statusNode = document.getElementById("status-button"); if (statusNode) { statusNode.setAttribute("value", url); } } var banner = internetSearchStore.GetTarget(src, bannerProperty, true); if (banner) banner = banner.QueryInterface(Components.interfaces.nsIRDFLiteral); if (banner) banner = banner.Value; var target = internetSearchStore.GetTarget(src, htmlProperty, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) { var text = "<HTML><HEAD><TITLE>Search</TITLE><BASE TARGET='_top'></HEAD><BODY><FONT POINT-SIZE='9'>"; if (banner) { // add a </A> and a <BR> just in case text += banner + "</A><BR>"; } text += target; text += "</FONT></BODY></HTML>" var doc = window.frames[0].document; doc.open("text/html", "replace"); doc.writeln(text); doc.close(); } } } } catch(ex) { } return(true);}
|
searchButtonNode.setAttribute("value", gStopButtonText);
|
searchButtonNode.setAttribute("label", gStopButtonText);
|
function doSearch(){ var searchMode = nsPreferences.getIntPref("browser.search.mode", 0); // hide various columns var navWindow = getNavigatorWindow(false); if (navWindow && "_content" in navWindow && "isMozillaSearchWindow" in navWindow._content) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("hidden", "true"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("hidden", "true"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("hidden", "true"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if (!textNode.value) { alert(searchBundle.getString("enterstringandlocation")); return; } if (searchMode > 0) { var foundEngine = false; var engineURIs = []; var treeitemNode; var engineBox = document.getElementById("engineKids"); // in advanced search mode, get selected search engines // (for the current search category) for (var x = 0; x < engineBox.childNodes.length; x++) { treeitemNode = engineBox.childNodes[x]; if (treeitemNode) { var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (checkboxNode && checkboxNode.checked) { var engineURI = treeitemNode.id; if (engineURI) { engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } } } if (!foundEngine) { if (getNumEngines() == 1) { // only one engine in this category, check it treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.id; } else { for (var i = 0; i < engineBox.childNodes.length; ++i) { treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.id; if (theID.indexOf("NetscapeSearch.src") != -1) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (!foundEngine) { alert(searchBundle.getString("enterstringandlocation")); return; } } } } if (!gStopButtonText) gStopButtonText = searchBundle.getString("stopButtonText"); var searchButtonNode = document.getElementById("searchButton"); searchButtonNode.setAttribute("stop", "true"); searchButtonNode.setAttribute("value", gStopButtonText); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute("mode", "undetermined"); // run the search OpenSearch(textNode.value, engineURIs); switchTab(0);}
|
var checkbox = engineBox.childNodes[x].firstChild.firstChild.firstChild; if (!checkbox) continue;
|
var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue;
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x].firstChild.firstChild.firstChild; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.parentNode.parentNode.parentNode.id; if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild.firstChild.firstChild.firstChild; engineURIs[engineURIs.length] = checkbox.id; } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; if( checkbox.id.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
if ( checkbox.checked == true || checkbox.checked == "true")
|
if ( checkboxNode.checked == true || checkboxNode.checked == "true")
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x].firstChild.firstChild.firstChild; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.parentNode.parentNode.parentNode.id; if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild.firstChild.firstChild.firstChild; engineURIs[engineURIs.length] = checkbox.id; } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; if( checkbox.id.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
var engineURI = checkbox.parentNode.parentNode.parentNode.id;
|
var engineURI = treeitemNode.getAttribute("id");
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x].firstChild.firstChild.firstChild; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.parentNode.parentNode.parentNode.id; if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild.firstChild.firstChild.firstChild; engineURIs[engineURIs.length] = checkbox.id; } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; if( checkbox.id.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
var checkbox = engineBox.firstChild.firstChild.firstChild.firstChild; engineURIs[engineURIs.length] = checkbox.id;
|
var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id");
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x].firstChild.firstChild.firstChild; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.parentNode.parentNode.parentNode.id; if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild.firstChild.firstChild.firstChild; engineURIs[engineURIs.length] = checkbox.id; } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; if( checkbox.id.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
var checkbox = engineBox.childNodes[i]; if( checkbox.id.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id");
|
var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true;
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x].firstChild.firstChild.firstChild; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.parentNode.parentNode.parentNode.id; if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild.firstChild.firstChild.firstChild; engineURIs[engineURIs.length] = checkbox.id; } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; if( checkbox.id.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
} if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false);
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x].firstChild.firstChild.firstChild; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.parentNode.parentNode.parentNode.id; if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild.firstChild.firstChild.firstChild; engineURIs[engineURIs.length] = checkbox.id; } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; if( checkbox.id.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
|
var submission = ss.defaultEngine.getSubmission(searchTerm);
|
var submission = ss.defaultEngine.getSubmission(searchTerm, null);
|
function doSearch(searchTerm, cmdLine) { var ss = Components.classes["@mozilla.org/browser/search-service;1"] .getService(nsIBrowserSearchService); var submission = ss.defaultEngine.getSubmission(searchTerm); // fill our nsISupportsArray with uri-as-wstring, null, null, postData var sa = Components.classes["@mozilla.org/supports-array;1"] .createInstance(Components.interfaces.nsISupportsArray); var wuri = Components.classes["@mozilla.org/supports-string;1"] .createInstance(Components.interfaces.nsISupportsString); wuri.data = submission.uri.spec; sa.AppendElement(wuri); sa.AppendElement(null); sa.AppendElement(null); sa.AppendElement(submission.postData); // XXXbsmedberg: use handURIToExistingBrowser to obey tabbed-browsing // preferences, but need nsIBrowserDOMWindow extensions var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(nsIWindowWatcher); return wwatch.openWindow(null, nsBrowserContentHandler.chromeURL, "_blank", "chrome,dialog=no,all" + nsBrowserContentHandler.getFeatures(cmdLine), sa);}
|
if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return;
|
if (searchButton.disabled) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return;
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
var searchMode = 0; var mClickCount = 1; var prefvalue = false;
|
var searchMode = nsPreferences.getIntPref("browser.search.mode", 0); var mClickCount = nsPreferences.getBoolPref("browser.search.use_double_clicks", false) ? 2 : 1;
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); }
|
var tree = document.getElementById("Tree"); if (mClickCount == 1) tree.setAttribute("singleclick","true"); else tree.removeAttribute("singleclick");
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); }
|
var navWindow = getNavigatorWindow(false); if (navWindow && navWindow._content && navWindow._content.isMozillaSearchWindow) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); }
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
var engineURI = treeitemNode.getAttribute("id");
|
var engineURI = treeitemNode.id;
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
engineURIs[engineURIs.length] = treeitemNode.getAttribute("id");
|
engineURIs[engineURIs.length] = treeitemNode.id;
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
var theID = treeitemNode.getAttribute("id");
|
var theID = treeitemNode.id;
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false);
|
if (!foundEngine) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false);
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); dump("*** navWindow = " + navWindow + "\n"); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
eventTable = getEventTable( false );
|
eventTable = gEventSource.currentEvents;
|
function doSearch( ){ var eventTable = new Array(); var searchText = document.getElementById( "unifinder-search-field" ).value; if ( searchText.length <= 0 ) { eventTable = getEventTable( false ); } else if ( searchText == " " ) { searchText = ""; document.getElementById( "unifinder-search-field" ).value = ''; return; } else { var FieldsToSearch = new Array( "title", "description", "location", "categories" ); eventTable = gEventSource.search( searchText, FieldsToSearch ); } if( document.getElementById( "erase_command" ) ) { if( searchText.length <= 0 ) document.getElementById( "erase_command" ).setAttribute( "disabled", "true" ); else document.getElementById( "erase_command" ).removeAttribute( "disabled" ); } refreshEventTree( eventTable );}
|
if( parent._content.isMozillaSearchWindow )
|
var navWindow = getNavigatorWindow(); if( navWindow._content.isMozillaSearchWindow )
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
colNode = parent._content.document.getElementById("RelevanceColumn");
|
colNode = navWindow._content.document.getElementById("RelevanceColumn");
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
colNode = parent._content.document.getElementById("PriceColumn");
|
colNode = navWindow._content.document.getElementById("PriceColumn");
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
colNode = parent._content.document.getElementById("AvailabilityColumn");
|
colNode = navWindow._content.document.getElementById("AvailabilityColumn");
|
function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);}
|
input.focus();
|
SetTextfieldFocus(input);
|
function doSelect(e){ if ( TEXT_WIDGETS_DONT_SUCK && PERFORMANCE_BOOSTS ) { var cell = e.target.parentNode.lastChild; var input = cell.firstChild; var selitems = document.getElementsByAttribute("class","FocusSelected"); for ( var i = 0; i < selitems.length; i++ ) { if ( selitems[i].nodeName == "input" ) { selitems[i].removeAttribute("class","FocusSelected"); selitems[i].setAttribute("class","AttributesCell"); } else if ( selitems[i].nodeName == "treecell" ) selitems[i].removeAttribute("class","FocusSelected"); } cell.setAttribute("class","FocusSelected"); input.setAttribute("class","FocusSelected"); input.focus(); }}
|
var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); treeNode.selectAll(); return(true);
|
var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return false; treeNode.selectAll(); return true;
|
function doSelectAll(){ var treeNode = document.getElementById("bookmarksTree"); if (!treeNode) return(false); treeNode.selectAll(); return(true);}
|
var node = document.getElementById(sortColName); var sortResource = node.getAttribute('resource'); if (!node) return(false);
|
var node = document.getElementById(sortColName); var sortResource = node.getAttribute('resource'); if (!node) return false;
|
function doSort(sortColName){ var node = document.getElementById(sortColName); // determine column resource to sort on var sortResource = node.getAttribute('resource'); if (!node) return(false); var sortDirection="ascending"; var isSortActive = node.getAttribute('sortActive'); if (isSortActive == "true") { var currentDirection = node.getAttribute('sortDirection'); if (currentDirection == "ascending") sortDirection = "descending"; else if (currentDirection == "descending") sortDirection = "natural"; else sortDirection = "ascending"; } var isupports = Components.classes["component://netscape/rdf/xul-sort-service"].getService(); if (!isupports) return(false); var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); if (!xulSortService) return(false); try { xulSortService.Sort(node, sortResource, sortDirection); } catch(ex) { debug("Exception calling xulSortService.Sort()"); } return(false);}
|
var isupports = Components.classes["component: if (!isupports) return(false); var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); if (!xulSortService) return(false); try { xulSortService.Sort(node, sortResource, sortDirection); } catch(ex) { debug("Exception calling xulSortService.Sort()"); } return(false);
|
var isupports_uri = "component: var isupports = Components.classes[isupports_uri].getService(); if (!isupports) return false; var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); if (!xulSortService) return false; try { xulSortService.Sort(node, sortResource, sortDirection); } catch(ex) { debug("Exception calling xulSortService.Sort()"); } return false;
|
function doSort(sortColName){ var node = document.getElementById(sortColName); // determine column resource to sort on var sortResource = node.getAttribute('resource'); if (!node) return(false); var sortDirection="ascending"; var isSortActive = node.getAttribute('sortActive'); if (isSortActive == "true") { var currentDirection = node.getAttribute('sortDirection'); if (currentDirection == "ascending") sortDirection = "descending"; else if (currentDirection == "descending") sortDirection = "natural"; else sortDirection = "ascending"; } var isupports = Components.classes["component://netscape/rdf/xul-sort-service"].getService(); if (!isupports) return(false); var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); if (!xulSortService) return(false); try { xulSortService.Sort(node, sortResource, sortDirection); } catch(ex) { debug("Exception calling xulSortService.Sort()"); } return(false);}
|
XPAppCoresManager.Add(rdfCore);
|
function doSort(sortColName){ var node = document.getElementById(sortColName); // determine column resource to sort on var sortResource = node.getAttribute('resource'); if (!node) return(false); var sortDirection="ascending"; var isSortActive = node.getAttribute('sortActive'); if (isSortActive == "true") { var currentDirection = node.getAttribute('sortDirection'); if (currentDirection == "ascending") sortDirection = "descending"; else if (currentDirection == "descending") sortDirection = "natural"; else sortDirection = "ascending"; } // get RDF Core service var rdfCore = XPAppCoresManager.Find("RDFCore"); if (!rdfCore) { rdfCore = new RDFCore(); if (!rdfCore) { return(false); } rdfCore.Init("RDFCore"); XPAppCoresManager.Add(rdfCore); } // sort!!! rdfCore.doSort(node, sortResource, sortDirection); return(false);}
|
|
var isupports = Components.classes["@mozilla.org/rdf/xul-sort-service;1"].getService();
|
var isupports = Components.classes["@mozilla.org/xul/xul-sort-service;1"].getService();
|
function doSort(sortColName, naturalOrderResource){ var node = document.getElementById(sortColName); // determine column resource to sort on var sortResource = node.getAttribute('resource'); if (!sortResource) return(false); var sortDirection="ascending"; var isSortActive = node.getAttribute('sortActive'); if (isSortActive == "true") { sortDirection = "ascending"; var currentDirection = node.getAttribute('sortDirection'); if (currentDirection == "ascending") { if (sortResource != naturalOrderResource) { sortDirection = "descending"; } } else if (currentDirection == "descending") { if (naturalOrderResource != null && naturalOrderResource != "") { sortResource = naturalOrderResource; } } } var isupports = Components.classes["@mozilla.org/rdf/xul-sort-service;1"].getService(); if (!isupports) return(false); var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); if (!xulSortService) return(false); try { xulSortService.Sort(node, sortResource, sortDirection); } catch(ex) { debug("Exception calling xulSortService.Sort()"); } return(true);}
|
window.close();
|
return true;
|
function doSSLOK(){ var ssl = document.getElementById("trustSSLCert"); //var checked = ssl.getAttribute("value"); var trustssl = ssl.selected ? nsIX509CertDB.TRUSTED_SSL : 0; // // Set the cert trust // certdb.setCertTrust(cert, nsIX509Cert.SERVER_CERT, trustssl); window.close();}
|
searchButtonNode.setAttribute("value", gSearchButtonText);
|
searchButtonNode.setAttribute("label", gSearchButtonText);
|
function doStop(){ if (!gSearchButtonText) gSearchButtonText = searchBundle.getString("searchButtonText"); var searchButtonNode = document.getElementById("searchButton"); searchButtonNode.removeAttribute("stop"); searchButtonNode.setAttribute("value", gSearchButtonText); // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute("mode", "normal"); // stop any network connections var internetSearchService = Components.classes[ISEARCH_CONTRACTID].getService(nsIInternetSearchService); internetSearchService.Stop(); // show appropriate column(s) var navWindow = getNavigatorWindow(false); var resultsTree = navWindow ? navWindow._content.document.getElementById("internetresultstree") : null; if (!resultsTree) return; var searchURL = resultsTree.getAttribute("ref"); if (!searchURL) return; var internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); // get various services var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var colNode; var sortSetFlag = false; if (hasPriceFlag) { colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("hidden"); if (!sortSetFlag) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("hidden"); } if (hasDateFlag) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("hidden"); } if (hasRelevanceFlag) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("hidden"); if (!sortSetFlag) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } if (!sortSetFlag) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false);
|
var navWindow = getNavigatorWindow(false); var resultsTree = navWindow ? navWindow._content.document.getElementById("internetresultstree") : null; if (!resultsTree) return false;
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(); if(hasPriceFlag == true) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
if( !searchURL ) return(false);
|
if (!searchURL) return false;
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(); if(hasPriceFlag == true) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
var navWindow = getNavigatorWindow(); if(hasPriceFlag == true)
|
var navWindow = getNavigatorWindow(false); if(hasPriceFlag)
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(); if(hasPriceFlag == true) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
if (sortSetFlag == false)
|
if (!sortSetFlag)
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(); if(hasPriceFlag == true) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
if (hasAvailabilityFlag == true)
|
if (hasAvailabilityFlag)
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(); if(hasPriceFlag == true) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
if (hasDateFlag == true)
|
if (hasDateFlag)
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(); if(hasPriceFlag == true) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
if (hasRelevanceFlag == true)
|
if (hasRelevanceFlag)
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(); if(hasPriceFlag == true) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
var resultsTree = top._content.document.getElementById("internetresultstree");
|
var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree");
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top._content.document.getElementById("PageRankColumn"); if (colNode) top._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
var colNode = top._content.document.getElementById("PriceColumn");
|
var colNode = navWindow._content.document.getElementById("PriceColumn");
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top._content.document.getElementById("PageRankColumn"); if (colNode) top._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
colNode = top._content.document.getElementById("AvailabilityColumn");
|
colNode = navWindow._content.document.getElementById("AvailabilityColumn");
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top._content.document.getElementById("PageRankColumn"); if (colNode) top._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
colNode = top._content.document.getElementById("DateColumn");
|
colNode = navWindow._content.document.getElementById("DateColumn");
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top._content.document.getElementById("PageRankColumn"); if (colNode) top._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
colNode = top._content.document.getElementById("RelevanceColumn");
|
colNode = navWindow._content.document.getElementById("RelevanceColumn");
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top._content.document.getElementById("PageRankColumn"); if (colNode) top._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
top._content.setInitialSort(colNode, "descending");
|
navWindow._content.setInitialSort(colNode, "descending");
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top._content.document.getElementById("PageRankColumn"); if (colNode) top._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
colNode = top._content.document.getElementById("PageRankColumn");
|
colNode = navWindow._content.document.getElementById("PageRankColumn");
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top._content.document.getElementById("PageRankColumn"); if (colNode) top._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
top._content.setInitialSort(colNode, "ascending");
|
navWindow._content.setInitialSort(colNode, "ascending");
|
function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top._content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top._content.document.getElementById("PageRankColumn"); if (colNode) top._content.setInitialSort(colNode, "ascending"); } switchTab(0);}
|
this.mOldCalendar.deleteItem(this.mOldItem, this.mListener);
|
doTransaction: function () { switch (this.mAction) { case 'add': this.mCalendar.addItem(this.mItem, this.mListener); break; case 'modify': this.mCalendar.modifyItem(this.mItem, this.mOldItem, this.mListener); break; case 'delete': this.mCalendar.deleteItem(this.mItem, this.mListener); break; case 'move': this.mOldCalendar = this.mOldItem.calendar; this.mCalendar.addItem(this.mItem, this.mListener); this.mOldCalendar.deleteItem(this.mOldItem, this.mListener); break; } },
|
|
this.kProcessor.importStylesheet(this.mStyleDoc); this.mResDoc = this.kProcessor.transformToDocument(this.mSourceDoc);
|
doTransform : function() { this.kProcessor.reset(); this.kProcessor.importStylesheet(this.mStyleDoc); this.mResDoc = this.kProcessor.transformToDocument(this.mSourceDoc); //var proc = new XSLTProcessor; //proc.importStylesheet(this.mStyleDoc); //this.mResDoc = proc.transformToDocument(this.mSourceDoc); try { this.mRefDoc.normalize(); isGood = DiffDOM(this.mResDoc.documentElement, this.mRefDoc.documentElement, this.mMethod == 'html'); } catch (e) { isGood = false; }; dump("This succeeded. "+isGood+"\n"); isGood = isGood.toString(); for (var i=0; i<this.kObservers.length; i++) { var aObs = this.kObservers[i]; if (typeof(aObs)=='object' && typeof(aObs.observe)=='function') { aObs.observe(this.mResource, 'success', isGood); } else if (typeof(aObs)=='function') { aObs(this.mResource, 'success', isGood); } } if (this.mObserver) { if (typeof(this.mObserver)=='object') { this.mObserver.observe(this.mResource, 'success', isGood); } else { this.mObserver(this.mResource, 'success', isGood); } } },
|
|
this.kProcessor.importStylesheet(this.mStyleDoc); this.mResDoc = this.kProcessor.transformToDocument(this.mSourceDoc);
|
doTransform : function() { this.kProcessor.reset(); this.kProcessor.importStylesheet(this.mStyleDoc); this.mResDoc = this.kProcessor.transformToDocument(this.mSourceDoc); //var proc = new XSLTProcessor; //proc.importStylesheet(this.mStyleDoc); //this.mResDoc = proc.transformToDocument(this.mSourceDoc); try { this.mRefDoc.normalize(); isGood = DiffDOM(this.mResDoc.documentElement, this.mRefDoc.documentElement, this.mMethod == 'html'); } catch (e) { isGood = false; }; dump("This succeeded. "+isGood+"\n"); isGood = isGood.toString(); for (var i=0; i<this.kObservers.length; i++) { var aObs = this.kObservers[i]; if (typeof(aObs)=='object' && typeof(aObs.observe)=='function') { aObs.observe(this.mResource, 'success', isGood); } else if (typeof(aObs)=='function') { aObs(this.mResource, 'success', isGood); } } if (this.mObserver) { if (typeof(this.mObserver)=='object') { this.mObserver.observe(this.mResource, 'success', isGood); } else { this.mObserver(this.mResource, 'success', isGood); } } },
|
|
tree.database.RemoveDatasource(HTTPIndex);
|
function DoUnload(){ var tree = document.getElementById("tree"); if (tree) { tree.database.RemoveObserver(RDF_observer); debug("Directory: removed observer\n"); }}
|
|
dd ("-*- testing url \"" + testURLs[u] + "\"");
|
dd ("testing url \"" + testURLs[u] + "\"");
|
function doURLTest(){ for (var u in testURLs) { dd ("-*- testing url \"" + testURLs[u] + "\""); var o = parseIRCURL(testURLs[u]); if (!o) dd ("-!- PARSE FAILED!"); else dd (dumpObjectTree(o)); dd ("---"); }}
|
dd ("-!- PARSE FAILED!");
|
dd ("PARSE FAILED!");
|
function doURLTest(){ for (var u in testURLs) { dd ("-*- testing url \"" + testURLs[u] + "\""); var o = parseIRCURL(testURLs[u]); if (!o) dd ("-!- PARSE FAILED!"); else dd (dumpObjectTree(o)); dd ("---"); }}
|
hasAnyChanged = false;
|
function doValueChanged(){ if ( !hasAnyChanged ) { hasAnyChanged = true; doOverallEnabling(); }}
|
|
var editorController; var numControllers = window.controllers.getControllerCount(); for (var i = numControllers-1; i >= 0 ; i --)
|
if (gComposerWindowControllerID != -1)
|
function DoWindowCommandControllerSetting(aEditor){ // the following is similar to GetEditorController() in ComposerCommands.js but we need // the nsIEditorController not the nsIControllerCommandManager // Also note that it gets the controllers from the window not window._content var editorController; var numControllers = window.controllers.getControllerCount(); // count down to find a controller that supplies a nsIControllerCommandManager interface for (var i = numControllers-1; i >= 0 ; i --) { var commandManager = null; try { var controller = window.controllers.getControllerAt(i); var interfaceRequestor = controller.QueryInterface(Components.interfaces.nsIInterfaceRequestor); commandManager = interfaceRequestor.getInterface(Components.interfaces.nsIControllerCommandManager); if (commandManager) { i = -1; // get out of loop editorController = controller.QueryInterface(Components.interfaces.nsIEditorController); } } catch(ex) { } } // if we find an editor controller, set the command refcon to the editor if (editorController) { var ISupportsEditor; try { ISupportsEditor = aEditor.QueryInterface(Components.interfaces.nsISupports); editorController.SetCommandRefCon(ISupportsEditor); } catch (e) {} }}
|
var commandManager = null;
|
function DoWindowCommandControllerSetting(aEditor){ // the following is similar to GetEditorController() in ComposerCommands.js but we need // the nsIEditorController not the nsIControllerCommandManager // Also note that it gets the controllers from the window not window._content var editorController; var numControllers = window.controllers.getControllerCount(); // count down to find a controller that supplies a nsIControllerCommandManager interface for (var i = numControllers-1; i >= 0 ; i --) { var commandManager = null; try { var controller = window.controllers.getControllerAt(i); var interfaceRequestor = controller.QueryInterface(Components.interfaces.nsIInterfaceRequestor); commandManager = interfaceRequestor.getInterface(Components.interfaces.nsIControllerCommandManager); if (commandManager) { i = -1; // get out of loop editorController = controller.QueryInterface(Components.interfaces.nsIEditorController); } } catch(ex) { } } // if we find an editor controller, set the command refcon to the editor if (editorController) { var ISupportsEditor; try { ISupportsEditor = aEditor.QueryInterface(Components.interfaces.nsISupports); editorController.SetCommandRefCon(ISupportsEditor); } catch (e) {} }}
|
|
var controller = window.controllers.getControllerAt(i); var interfaceRequestor = controller.QueryInterface(Components.interfaces.nsIInterfaceRequestor); commandManager = interfaceRequestor.getInterface(Components.interfaces.nsIControllerCommandManager); if (commandManager) { i = -1; editorController = controller.QueryInterface(Components.interfaces.nsIEditorController); } } catch(ex) { } } if (editorController) { var ISupportsEditor; try { ISupportsEditor = aEditor.QueryInterface(Components.interfaces.nsISupports); editorController.SetCommandRefCon(ISupportsEditor);
|
var controller = window.controllers.getControllerById(gComposerWindowControllerID); controller.SetCommandRefCon(aEditor.QueryInterface(Components.interfaces.nsISupports));
|
function DoWindowCommandControllerSetting(aEditor){ // the following is similar to GetEditorController() in ComposerCommands.js but we need // the nsIEditorController not the nsIControllerCommandManager // Also note that it gets the controllers from the window not window._content var editorController; var numControllers = window.controllers.getControllerCount(); // count down to find a controller that supplies a nsIControllerCommandManager interface for (var i = numControllers-1; i >= 0 ; i --) { var commandManager = null; try { var controller = window.controllers.getControllerAt(i); var interfaceRequestor = controller.QueryInterface(Components.interfaces.nsIInterfaceRequestor); commandManager = interfaceRequestor.getInterface(Components.interfaces.nsIControllerCommandManager); if (commandManager) { i = -1; // get out of loop editorController = controller.QueryInterface(Components.interfaces.nsIEditorController); } } catch(ex) { } } // if we find an editor controller, set the command refcon to the editor if (editorController) { var ISupportsEditor; try { ISupportsEditor = aEditor.QueryInterface(Components.interfaces.nsISupports); editorController.SetCommandRefCon(ISupportsEditor); } catch (e) {} }}
|
var lastModified = this.lastModified; if (lastModified) this.request.setRequestHeader("If-Modified-Since", lastModified);
|
download: function(aParseItems, aCallback) { this.downloadCallback = aCallback; // may be null // Whether or not to parse items when downloading and parsing the feed. // Defaults to true, but setting to false is useful for obtaining // just the title of the feed when the user subscribes to it. this.parseItems = aParseItems == null ? true : aParseItems ? true : false; // Before we do anything...make sure the url is an http url. This is just a sanity check // so we don't try opening mailto urls, imap urls, etc. that the user may have tried to subscribe to // as an rss feed.. var uri = Components.classes["@mozilla.org/network/standard-url;1"]. createInstance(Components.interfaces.nsIURI); uri.spec = this.url; if (!(uri.schemeIs("http") || uri.schemeIs("https"))) return this.onParseError(this); // simulate an invalid feed error // Before we try to download the feed, make sure we aren't already processing the feed // by looking up the url in our feed cache if (FeedCache.getFeed(this.url)) { if (this.downloadCallback) this.downloadCallback.downloaded(this, kNewsBlogFeedIsBusy); return ; // don't do anything, the feed is already in use } this.request = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .createInstance(Components.interfaces.nsIXMLHttpRequest); this.request.onprogress = Feed.onProgress; // must be set before calling .open this.request.open("GET", this.url, true); this.request.overrideMimeType("text/xml"); this.request.onload = this.onDownloaded; this.request.onerror = this.onDownloadError; FeedCache.putFeed(this); this.request.send(null); },
|
|
BrowserViewDownload();
|
document.getElementById("download-button-stop").disabled=false; BrowserViewDownload(false);
|
function DownloadCancel(refId) { try { document.getElementById("toolbar-download-tag").cachedCancelable.cancel(NS_BINDING_ABORTED) } catch (e) { alert(e) }; BrowserViewDownload();}
|
var id = aDownload.target.path;
|
var id = aDownload.targetFile.path;
|
function downloadCompleted(aDownload) { // Wrap this in try...catch since this can be called while shutting down... // it doesn't really matter if it fails then since well.. we're shutting down // and there's no UI to update! try { var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); var rdfc = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer); var db = gDownloadManager.datasource; rdfc.Init(db, rdf.GetResource("NC:DownloadsRoot")); var id = aDownload.target.path; // Refresh the icon, so that executable icons are shown. var mimeService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"].getService(Components.interfaces.nsIMIMEService); var contentType = mimeService.getTypeFromFile(aDownload.target); var listItem = document.getElementById(id); var oldImage = listItem.getAttribute("image"); // I tack on the content-type here as a hack to bypass the cache which seems // to be interfering despite the fact the image has 'validate="always"' set // on it. listItem.setAttribute("image", oldImage + "&contentType=" + contentType); var dlRes = rdf.GetUnicodeResource(id); var insertIndex = gDownloadManager.activeDownloadCount + 1; // Don't bother inserting the item into the same place! if (insertIndex != rdfc.IndexOf(dlRes)) { rdfc.RemoveElement(dlRes, true); if (insertIndex == rdfc.GetCount() || insertIndex < 1) rdfc.AppendElement(dlRes); else rdfc.InsertElementAt(dlRes, insertIndex, true); } // Remove the download from our book-keeping list and if the count // falls to zero, update the title here, since we won't be getting // any more progress notifications in which to do it. for (var i = 0; i < gActiveDownloads.length; ++i) { if (gActiveDownloads[i] == aDownload) { gActiveDownloads.splice(i, 1); break; } } if (gActiveDownloads.length == 0) window.title = document.documentElement.getAttribute("statictitle"); } catch (e) { }}
|
var contentType = mimeService.getTypeFromFile(aDownload.target);
|
var contentType = mimeService.getTypeFromFile(aDownload.targetFile);
|
function downloadCompleted(aDownload) { // Wrap this in try...catch since this can be called while shutting down... // it doesn't really matter if it fails then since well.. we're shutting down // and there's no UI to update! try { var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); var rdfc = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer); var db = gDownloadManager.datasource; rdfc.Init(db, rdf.GetResource("NC:DownloadsRoot")); var id = aDownload.target.path; // Refresh the icon, so that executable icons are shown. var mimeService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"].getService(Components.interfaces.nsIMIMEService); var contentType = mimeService.getTypeFromFile(aDownload.target); var listItem = document.getElementById(id); var oldImage = listItem.getAttribute("image"); // I tack on the content-type here as a hack to bypass the cache which seems // to be interfering despite the fact the image has 'validate="always"' set // on it. listItem.setAttribute("image", oldImage + "&contentType=" + contentType); var dlRes = rdf.GetUnicodeResource(id); var insertIndex = gDownloadManager.activeDownloadCount + 1; // Don't bother inserting the item into the same place! if (insertIndex != rdfc.IndexOf(dlRes)) { rdfc.RemoveElement(dlRes, true); if (insertIndex == rdfc.GetCount() || insertIndex < 1) rdfc.AppendElement(dlRes); else rdfc.InsertElementAt(dlRes, insertIndex, true); } // Remove the download from our book-keeping list and if the count // falls to zero, update the title here, since we won't be getting // any more progress notifications in which to do it. for (var i = 0; i < gActiveDownloads.length; ++i) { if (gActiveDownloads[i] == aDownload) { gActiveDownloads.splice(i, 1); break; } } if (gActiveDownloads.length == 0) window.title = document.documentElement.getAttribute("statictitle"); } catch (e) { }}
|
document.getElementById('addButton').removeAttribute('disabled');
|
downloaded: function(feed, aErrorCode) { // feed is null if our attempt to parse the feed failed if (aErrorCode == kNewsBlogSuccess) { updateStatusItem('progressMeter', 100); // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : gRSSServer.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); // add feed just adds the feed we have validated and downloaded to the subscription UI. // it also flushes the subscription datasource addFeed(feed.url, feed.name, folder); } else if (aErrorCode == kNewsBlogInvalidFeed) // the feed was bad... window.alert(document.getElementById('bundle_newsblog').getFormattedString('newsblog-invalidFeed', [feed.url])); else // we never even downloaded the feed...(kNewsBlogRequestFailure) window.alert(document.getElementById('bundle_newsblog').getFormattedString('newsblog-networkError', [feed.url])); // our operation is done...clear out the status text and progressmeter setTimeout(clearStatusInfo, 1000); },
|
|
updateStatusItem('statusText', document.getElementById("bundle_newsblog").getString('subscribe-validFeedFound')); updateStatusItem('statusText', 'Valid Feed Found!');
|
downloaded: function(feed) { // feed is null if our attempt to parse the feed failed if (feed) { updateStatusItem('progressMeter', 100); updateStatusItem('statusText', document.getElementById("bundle_newsblog").getString('subscribe-validFeedFound')); updateStatusItem('statusText', 'Valid Feed Found!'); var server = getIncomingServer(); // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : server.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); // add feed just adds the feed we have validated and downloaded to the subscription UI. // it also flushes the subscription datasource addFeed(feed.url, feed.name, null, folder); } else { // Add some code to alert the user that the feed was not something we could understand... } // our operation is done...clear out the status text and progressmeter setTimeout(clearStatusInfo, 1000); },
|
|
if (aErrorCode == kNewsBlogInvalidFeed) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-invalidFeed", [feed.url], 1));
|
var newsBlogBundle = GetNewsBlogStringBundle(); if (aErrorCode == kNewsBlogNoNewItems) this.mStatusFeedback.showStatusString(newsBlogBundle.GetStringFromName("newsblog-noNewArticlesForFeed")); else if (aErrorCode == kNewsBlogInvalidFeed) this.mStatusFeedback.showStatusString(newsBlogBundle.formatStringFromName("newsblog-invalidFeed", [feed.url], 1));
|
downloaded: function(feed, aErrorCode) { if (this.mSubscribeMode && aErrorCode == kNewsBlogSuccess) { // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... updateFolderFeedUrl(feed.folder, feed.url, false); addFeed(feed.url, feed.name, feed.folder); // add feed just adds the feed to the subscription UI and flushes the datasource // Nice touch: select the folder that now contains the newly subscribed feed...this is particularly nice // if we just finished subscribing to a feed URL that the operating system gave us. this.mMsgWindow.SelectFolder(feed.folder.URI); } if (this.mStatusFeedback) { if (aErrorCode == kNewsBlogInvalidFeed) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-invalidFeed", [feed.url], 1)); else if (aErrorCode == kNewsBlogRequestFailure) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-networkError", [feed.url], 1)); this.mStatusFeedback.stopMeteors(); } gNumPendingFeedDownloads--; if (!gNumPendingFeedDownloads) { this.mFeeds = new Array; this.mSubscribeMode = false; // should we do this on a timer so the text sticks around for a little while? // It doesnt look like we do it on a timer for newsgroups so we'll follow that model. if (aErrorCode == kNewsBlogSuccess && this.mStatusFeedback) // don't clear the status text if we just dumped an error to the status bar! this.mStatusFeedback.showStatusString(""); } },
|
this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-networkError", [feed.url], 1));
|
this.mStatusFeedback.showStatusString(newsBlogBundle.formatStringFromName("newsblog-networkError", [feed.url], 1));
|
downloaded: function(feed, aErrorCode) { if (this.mSubscribeMode && aErrorCode == kNewsBlogSuccess) { // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... updateFolderFeedUrl(feed.folder, feed.url, false); addFeed(feed.url, feed.name, feed.folder); // add feed just adds the feed to the subscription UI and flushes the datasource // Nice touch: select the folder that now contains the newly subscribed feed...this is particularly nice // if we just finished subscribing to a feed URL that the operating system gave us. this.mMsgWindow.SelectFolder(feed.folder.URI); } if (this.mStatusFeedback) { if (aErrorCode == kNewsBlogInvalidFeed) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-invalidFeed", [feed.url], 1)); else if (aErrorCode == kNewsBlogRequestFailure) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-networkError", [feed.url], 1)); this.mStatusFeedback.stopMeteors(); } gNumPendingFeedDownloads--; if (!gNumPendingFeedDownloads) { this.mFeeds = new Array; this.mSubscribeMode = false; // should we do this on a timer so the text sticks around for a little while? // It doesnt look like we do it on a timer for newsgroups so we'll follow that model. if (aErrorCode == kNewsBlogSuccess && this.mStatusFeedback) // don't clear the status text if we just dumped an error to the status bar! this.mStatusFeedback.showStatusString(""); } },
|
feed = new Feed(id);
|
feed = new Feed(id, aFolder.server);
|
downloadFeed: function(aUrl, aFolder, aQuickMode, aTitle, aUrlListener, aMsgWindow) { if (!gExternalScriptsLoaded) loadScripts(); // we don't yet support the ability to check for new articles while we are in the middle of // subscribing to a feed. For now, abort the check for new feeds. if (progressNotifier.mSubscribeMode) { debug('Aborting RSS New Mail Check. Feed subscription in progress\n'); return; } // if folder seems to have lost its feeds, look in DS for feeds. if (!aUrl.length) { var ds = getSubscriptionsDS(aFolder.server); var enumerator = ds.GetSources(FZ_DESTFOLDER, aFolder, true); var concatenatedUris = ""; while (enumerator.hasMoreElements()) { var containerArc = enumerator.getNext(); var uri = containerArc.QueryInterface(Components.interfaces.nsIRDFResource).Value; if (concatenatedUris.length > 0) concatenatedUris += "|"; concatenatedUris += uri; } if (concatenatedUris.length > 0) { aUrl = concatenatedUris; try { var msgdb = aFolder.getMsgDatabase(null); var folderInfo = msgdb.dBFolderInfo; folderInfo.setCharPtrProperty("feedUrl", concatenatedUris); } catch (ex) {dump(ex);} } } // aUrl may be a delimited list of feeds for a particular folder. We need to kick off a download // for each feed. var feedUrlArray = aUrl.split("|"); // we might just pull all these args out of the aFolder DB, instead of passing them in... var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"] .getService(Components.interfaces.nsIRDFService); progressNotifier.init(aMsgWindow ? aMsgWindow.statusFeedback : null, false); for (url in feedUrlArray) { if (feedUrlArray[url]) { id = rdf.GetResource(feedUrlArray[url]); feed = new Feed(id); feed.folder = aFolder; feed.server = aFolder.server; gNumPendingFeedDownloads++; // bump our pending feed download count feed.download(true, progressNotifier); } } },
|
feed.server = aFolder.server;
|
downloadFeed: function(aUrl, aFolder, aQuickMode, aTitle, aUrlListener, aMsgWindow) { if (!gExternalScriptsLoaded) loadScripts(); // we don't yet support the ability to check for new articles while we are in the middle of // subscribing to a feed. For now, abort the check for new feeds. if (progressNotifier.mSubscribeMode) { debug('Aborting RSS New Mail Check. Feed subscription in progress\n'); return; } // if folder seems to have lost its feeds, look in DS for feeds. if (!aUrl.length) { var ds = getSubscriptionsDS(aFolder.server); var enumerator = ds.GetSources(FZ_DESTFOLDER, aFolder, true); var concatenatedUris = ""; while (enumerator.hasMoreElements()) { var containerArc = enumerator.getNext(); var uri = containerArc.QueryInterface(Components.interfaces.nsIRDFResource).Value; if (concatenatedUris.length > 0) concatenatedUris += "|"; concatenatedUris += uri; } if (concatenatedUris.length > 0) { aUrl = concatenatedUris; try { var msgdb = aFolder.getMsgDatabase(null); var folderInfo = msgdb.dBFolderInfo; folderInfo.setCharPtrProperty("feedUrl", concatenatedUris); } catch (ex) {dump(ex);} } } // aUrl may be a delimited list of feeds for a particular folder. We need to kick off a download // for each feed. var feedUrlArray = aUrl.split("|"); // we might just pull all these args out of the aFolder DB, instead of passing them in... var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"] .getService(Components.interfaces.nsIRDFService); progressNotifier.init(aMsgWindow ? aMsgWindow.statusFeedback : null, false); for (url in feedUrlArray) { if (feedUrlArray[url]) { id = rdf.GetResource(feedUrlArray[url]); feed = new Feed(id); feed.folder = aFolder; feed.server = aFolder.server; gNumPendingFeedDownloads++; // bump our pending feed download count feed.download(true, progressNotifier); } } },
|
|
if (progressNotifier.mSubscribeMode) { debug('Aborting RSS New Mail Check. Feed subscription in progress\n'); return; }
|
downloadFeed: function(aUrl, aFolder, aQuickMode, aTitle, aUrlListener, aMsgWindow) { if (!gExternalScriptsLoaded) loadScripts(); // aUrl may be a delimited list of feeds for a particular folder. We need to kick off a download // for each feed. var feedUrlArray = aUrl.split("|"); // we might just pull all these args out of the aFolder DB, instead of passing them in... var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"] .getService(Components.interfaces.nsIRDFService); progressNotifier.init(aMsgWindow.statusFeedback, false); for (url in feedUrlArray) { if (feedUrlArray[url]) { id = rdf.GetResource(feedUrlArray[url]); feed = new Feed(id); feed.folder = aFolder; feed.server = aFolder.server; gNumPendingFeedDownloads++; // bump our pending feed download count feed.download(true, progressNotifier); } } },
|
|
if (!aUrl.length) { var ds = getSubscriptionsDS(aFolder.server); var enumerator = ds.GetSources(FZ_DESTFOLDER, aFolder, true); var concatenatedUris = ""; while (enumerator.hasMoreElements()) { var containerArc = enumerator.getNext(); var uri = containerArc.QueryInterface(Components.interfaces.nsIRDFResource).Value; if (concatenatedUris.length > 0) concatenatedUris += "|"; concatenatedUris += uri; } if (concatenatedUris.length > 0) { aUrl = concatenatedUris; try { var msgdb = aFolder.getMsgDatabase(null); var folderInfo = msgdb.dBFolderInfo; folderInfo.setCharPtrProperty("feedUrl", concatenatedUris); } catch (ex) {dump(ex);} } }
|
downloadFeed: function(aUrl, aFolder, aQuickMode, aTitle, aUrlListener, aMsgWindow) { if (!gExternalScriptsLoaded) loadScripts(); // we don't yet support thee ability to check for new articles while we are in the middle of // subscribing to a feed. For now, abort the check for new feeds. if (progressNotifier.mSubscribeMode) { debug('Aborting RSS New Mail Check. Feed subscription in progress\n'); return; } // aUrl may be a delimited list of feeds for a particular folder. We need to kick off a download // for each feed. var feedUrlArray = aUrl.split("|"); // we might just pull all these args out of the aFolder DB, instead of passing them in... var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"] .getService(Components.interfaces.nsIRDFService); progressNotifier.init(aMsgWindow ? aMsgWindow.statusFeedback : null, false); for (url in feedUrlArray) { if (feedUrlArray[url]) { id = rdf.GetResource(feedUrlArray[url]); feed = new Feed(id); feed.folder = aFolder; feed.server = aFolder.server; gNumPendingFeedDownloads++; // bump our pending feed download count feed.download(true, progressNotifier); } } },
|
|
this._statusFormatKBMB = us.getString("statusFormatKBMB"); this._statusFormatKBKB = us.getString("statusFormatKBKB"); this._statusFormatMBMB = us.getString("statusFormatMBMB"); this._statusFormatUnknownMB = us.getString("statusFormatUnknownMB"); this._statusFormatUnknownKB = us.getString("statusFormatUnknownKB");
|
this._progressFormat = us.getString("progressFormat"); this._progressFormatKBMB = us.getString("progressFormatKBMB"); this._progressFormatKBKB = us.getString("progressFormatKBKB"); this._progressFormatMBMB = us.getString("progressFormatMBMB"); this._progressFormatUnknownMB = us.getString("progressFormatUnknownMB"); this._progressFormatUnknownKB = us.getString("progressFormatUnknownKB"); this._rateFormat = us.getString("rateFormat");
|
function DownloadStatusFormatter() { this._startTime = Math.floor((new Date()).getTime() / 1000); this._elapsed = 0; var us = gUpdates.strings; this._statusFormat = us.getString("statusFormat"); this._statusFormatKBMB = us.getString("statusFormatKBMB"); this._statusFormatKBKB = us.getString("statusFormatKBKB"); this._statusFormatMBMB = us.getString("statusFormatMBMB"); this._statusFormatUnknownMB = us.getString("statusFormatUnknownMB"); this._statusFormatUnknownKB = us.getString("statusFormatUnknownKB"); this._rateFormatKBSec = us.getString("rateFormatKBSec"); this._rateFormatMBSec = us.getString("rateFormatMBSec"); this._remain = us.getString("remain"); this._unknownFilesize = us.getString("unknownFilesize"); this._longTimeFormat = us.getString("longTimeFormat"); this._shortTimeFormat = us.getString("shortTimeFormat");}
|
this._longTimeFormat = us.getString("longTimeFormat"); this._shortTimeFormat = us.getString("shortTimeFormat");
|
function DownloadStatusFormatter() { this._startTime = Math.floor((new Date()).getTime() / 1000); this._elapsed = 0; var us = gUpdates.strings; this._statusFormat = us.getString("statusFormat"); this._statusFormatKBMB = us.getString("statusFormatKBMB"); this._statusFormatKBKB = us.getString("statusFormatKBKB"); this._statusFormatMBMB = us.getString("statusFormatMBMB"); this._statusFormatUnknownMB = us.getString("statusFormatUnknownMB"); this._statusFormatUnknownKB = us.getString("statusFormatUnknownKB"); this._rateFormatKBSec = us.getString("rateFormatKBSec"); this._rateFormatMBSec = us.getString("rateFormatMBSec"); this._remain = us.getString("remain"); this._unknownFilesize = us.getString("unknownFilesize"); this._longTimeFormat = us.getString("longTimeFormat"); this._shortTimeFormat = us.getString("shortTimeFormat");}
|
|
if (!this.checkCanDrop(aEvent, aDragDropObserver)) return;
|
dragExit: function (aEvent, aDragDropObserver) { if ("onDragExit" in aDragDropObserver) aDragDropObserver.onDragExit(aEvent, this.mDragSession); },
|
|
if (!this.mDragSession) this.mDragSession = this.mDragService.getCurrentSession(); if (this.mDragSession)
|
if (!this.checkCanDrop(aEvent, aDragDropObserver)) return; var flavourSet = aDragDropObserver.getSupportedFlavours(); for (var flavour in flavourSet.flavourTable)
|
dragOver: function (aEvent, aDragDropObserver) { if (!("onDragOver" in aDragDropObserver)) return; if (!this.mDragSession) this.mDragSession = this.mDragService.getCurrentSession(); if (this.mDragSession) { var flavourSet = aDragDropObserver.getSupportedFlavours(); for (var flavour in flavourSet.flavourTable) { if (this.mDragSession.isDataFlavorSupported(flavour)) { this.mDragSession.canDrop = (this.mDragSession.sourceNode != aEvent.target); aDragDropObserver.onDragOver(aEvent, flavourSet.flavourTable[flavour], this.mDragSession); aEvent.preventBubble(); break; } } } },
|
var flavourSet = aDragDropObserver.getSupportedFlavours(); for (var flavour in flavourSet.flavourTable)
|
if (this.mDragSession.isDataFlavorSupported(flavour))
|
dragOver: function (aEvent, aDragDropObserver) { if (!("onDragOver" in aDragDropObserver)) return; if (!this.mDragSession) this.mDragSession = this.mDragService.getCurrentSession(); if (this.mDragSession) { var flavourSet = aDragDropObserver.getSupportedFlavours(); for (var flavour in flavourSet.flavourTable) { if (this.mDragSession.isDataFlavorSupported(flavour)) { this.mDragSession.canDrop = (this.mDragSession.sourceNode != aEvent.target); aDragDropObserver.onDragOver(aEvent, flavourSet.flavourTable[flavour], this.mDragSession); aEvent.preventBubble(); break; } } } },
|
if (this.mDragSession.isDataFlavorSupported(flavour)) { this.mDragSession.canDrop = (this.mDragSession.sourceNode != aEvent.target); aDragDropObserver.onDragOver(aEvent, flavourSet.flavourTable[flavour], this.mDragSession); aEvent.preventBubble(); break; }
|
aDragDropObserver.onDragOver(aEvent, flavourSet.flavourTable[flavour], this.mDragSession); aEvent.preventBubble(); break;
|
dragOver: function (aEvent, aDragDropObserver) { if (!("onDragOver" in aDragDropObserver)) return; if (!this.mDragSession) this.mDragSession = this.mDragService.getCurrentSession(); if (this.mDragSession) { var flavourSet = aDragDropObserver.getSupportedFlavours(); for (var flavour in flavourSet.flavourTable) { if (this.mDragSession.isDataFlavorSupported(flavour)) { this.mDragSession.canDrop = (this.mDragSession.sourceNode != aEvent.target); aDragDropObserver.onDragOver(aEvent, flavourSet.flavourTable[flavour], this.mDragSession); aEvent.preventBubble(); break; } } } },
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.