rem:  var clipboard = Components .classes["component: .getService ( Components.interfaces.nsIClipboard );  var trans = Components .classes["component: .createInstance( Components.interfaces.nsITransferable ); if ( !clipboard || !trans ) 
add: try {  var clipboard = Components .classes["component: .getService ( Components.interfaces.nsIClipboard );  var trans = Components .classes["component: .createInstance( Components.interfaces.nsITransferable ); if ( !clipboard || !trans ) return null;  trans.addDataFlavor( "text/unicode" ); clipboard.getData(trans, clipboard.kSelectionClipboard);  var data = new Object(); var dataLen = new Object(); trans.getTransferData("text/unicode", data, dataLen); var url = null; if (data) { data = data.value.QueryInterface(Components.interfaces .nsISupportsWString); url = data.data.substring(0, dataLen.value / 2); } return url; } catch(ex) { 
context:   function readFromClipboard()  {    // Get clipboard.    var clipboard = Components                      .classes["component://netscape/widget/clipboard"]                        .getService ( Components.interfaces.nsIClipboard );    // Create tranferable that will transfer the text.    var trans = Components                   .classes["component://netscape/widget/transferable"]                     .createInstance( Components.interfaces.nsITransferable );    if ( !clipboard || !trans )      return null;    trans.addDataFlavor( "text/unicode" );    clipboard.getData(trans, clipboard.kSelectionClipboard);	var data = new Object();	var dataLen = new Object();	trans.getTransferData("text/unicode", data, dataLen);    var url = null;	if (data)    {      data = data.value.QueryInterface(Components.interfaces                                                    .nsISupportsWString);      url = data.data.substring(0, dataLen.value / 2);    }	return url;  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/39b65f6c50dd9e75032775a40b552f201c8d3a71/navigator.js/clean/xpfe/browser/resources/content/navigator.js