add: if ( !gDragDropEnabled ) return;  
context:   function DropPersonalToolbar ( event )  {     var dropAccepted = false;        var dragService = Components.classes["component://netscape/widget/dragservice"].getService();    if ( dragService ) dragService = dragService.QueryInterface(Components.interfaces.nsIDragService);    if ( dragService ) {      var dragSession = dragService.getCurrentSession();      if ( dragSession ) {        var trans = Components.classes["component://netscape/widget/transferable"].createInstance();        if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable);        if ( trans ) {		// get references to various services/resources once up-front		var personalToolbarRes = null;				var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();		if (rdf)   rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);		if (rdf)		{			personalToolbarRes = rdf.GetResource("NC:PersonalToolbarFolder");		}		var rdfc = Components.classes["component://netscape/rdf/container"].getService();		if (rdfc)  rdfc = rdfc.QueryInterface(Components.interfaces.nsIRDFContainer);          trans.addDataFlavor("moz/toolbaritem");          for ( var i = 0; i < dragSession.numDropItems; ++i ) {            dragSession.getData ( trans, i );            var dataObj = new Object();            var bestFlavor = new Object();            var len = new Object();            trans.getAnyTransferData ( bestFlavor, dataObj, len );            if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString);            if ( dataObj ) {                          // remember len is in bytes, not chars              var id = dataObj.data.substring(0, len.value / 2);              dump("ID: '" + id + "'\n");              		var objectRes = rdf.GetResource(id, true);              dragSession.canDrop = true;              dropAccepted = true;              		var boxWithDatabase = document.getElementById("innermostBox");		var database = boxWithDatabase.database;		if (database && rdf && rdfc && personalToolbarRes && objectRes)		{						rdfc.Init(database, personalToolbarRes);			// Note: RDF Sequences are one-based, not zero-based			// XXX figure out the REAL index to insert at;			// for the moment, insert it as the first element (pos=1)			var newIndex = 1;				var currentIndex = rdfc.IndexOf(objectRes);			if (currentIndex > 0)			{				dump("Element '" + id + "' was at position # " + currentIndex + "\n");				rdfc.RemoveElement(objectRes, true);				dump("Element '" + id + "' removed from position # " + currentIndex + "\n");			}			rdfc.InsertElementAt(objectRes, newIndex, true);			dump("Element '" + id + "' re-inserted at new position # " + newIndex + ".\n");		}            }                     } // foreach drag item              } // if transferable      } // if dragsession    } // if dragservice        if ( dropAccepted )               // don't propagate the event if we did the drop      event.preventBubble();  } // DropPersonalToolbar
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/2c86922f1c8008354485171557c1ef683b2002d4/navigator.js/clean/suite/browser/navigator.js