PK 7V3chrome/PK F433chrome/memotoofirefox.jarPK X3content/PK `!32((content/bmsyncNetworkService.js// this code was written by Torisugari var gBookmarksSynchronizerUploadService= { _channel:null, _callback:null, _data:"", _scheme:"", _errorData:"", start:function(aStr,aURI,aType,aCallback) { if( !aStr || !aURI) return false; this._callback=aCallback; this._scheme=aURI.scheme; const ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); const stringStream=Components.classes["@mozilla.org/io/string-input-stream;1"] .createInstance(Components.interfaces.nsIStringInputStream); this._channel = ioService.newChannelFromURI( aURI ) .QueryInterface(Components.interfaces.nsIUploadChannel); try{ stringStream.setData(aStr, -1); this._channel.setUploadStream(stringStream,aType,-1); this._channel.asyncOpen(this, null); this._callback("send",status); this._data=aStr; return true; }catch(e){window.alert("__netwerk__\n\n"+"e");} return false; }, cancel:function() { if(this._channel) this._channel.cancel(0x804b0002); }, onDataAvailable: function (channel, ctxt, input, sourceOffset, count){ const sis = Components.classes["@mozilla.org/scriptableinputstream;1"] .createInstance(Components.interfaces.nsIScriptableInputStream); sis.init(input); this._errorData +=sis.read(count); }, onStartRequest: function (channel, ctxt){}, onStopRequest: function (channel, ctxt, status) { if(this._scheme != "ftp") { var res=0; try{ res = channel.QueryInterface(Components.interfaces.nsIHttpChannel) .responseStatus; }catch(e){} if(res==200||res==201 || res==204) status=0; /* 200:OK 201:Created 204:No Content This is an uploading channel, no need to "GET" the file contents. */ if(this._errorData || res==401) status=res; if(this._errorData && res==200) alert(this._errorData); } if(this._callback) this._callback("done",status); } }; var gBookmarksSynchronizerDownloadService= { _channel:null, _scheme:"", _callback:null, _startTime:0, _endTime:0, streamLoader:null, data:null, length:null, start:function(aURI,aCallback) { if( !aURI ) return false; this._callback=aCallback; this._scheme=aURI.scheme; try{ var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); this.streamLoader=Components.classes["@mozilla.org/network/stream-loader;1"] .createInstance(Components.interfaces.nsIStreamLoader); this._channel = ioService.newChannelFromURI( aURI ); if(aURI.scheme=="http" || aURI.scheme=="https") this._channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE; this.streamLoader.init(this._channel, this , null); this._startTime=(new Date()).getTime(); }catch(e){ alert(e); return false;} return true; }, cancel:function() { if(this._channel) this._channel.cancel(0x804b0002); }, onStreamComplete :function ( loader , ctxt , status , resultLength , result ) { this.data=""; this._endTime=(new Date()).getTime(); if(status==0) { this.length=resultLength; if(typeof(result)=="string") this.data=result; else { while(result.length > (256*192) ) { this.data += String.fromCharCode.apply(this,result.splice(0,256*192)); } this.data += String.fromCharCode.apply(this,result); } } if(this._scheme != "ftp") { var res=0; try{ res = this._channel.QueryInterface(Components.interfaces.nsIHttpChannel) .responseStatus; }catch(e){} if(res==401) status=res; } if(this._callback) this._callback("done",status); }, get time(){ return this._endTime-this._startTime; } }; PK 3\content/bookmarks.jsinitServices(); initBMService(); var BookmarksCommandMemotoo = { doBookmarksCommand: function (aSource, aCommand, aArgumentsArray) { var rCommand = RDF.GetResource(aCommand); var kSuppArrayContractID = "@mozilla.org/supports-array;1"; var kSuppArrayIID = Components.interfaces.nsISupportsArray; var sourcesArray = Components.classes[kSuppArrayContractID].createInstance(kSuppArrayIID); if (aSource) { sourcesArray.AppendElement(aSource); } var argsArray = Components.classes[kSuppArrayContractID].createInstance(kSuppArrayIID); var length = aArgumentsArray?aArgumentsArray.length:0; for (var i = 0; i < length; ++i) { var rArc = RDF.GetResource(aArgumentsArray[i].property); argsArray.AppendElement(rArc); var rValue = null; if ("resource" in aArgumentsArray[i]) { rValue = RDF.GetResource(aArgumentsArray[i].resource); } else rValue = RDF.GetLiteral(aArgumentsArray[i].literal); argsArray.AppendElement(rValue); } // Exec the command in the Bookmarks datasource. BMDS.DoCommand(sourcesArray, rCommand, argsArray); }, importBookmarksFromFile: function (aDossier, aFile) { var rTarget = RDF.GetResource(aDossier); if (! BMSVC.isBookmarkedResource(rTarget)) { rTarget = RDF.GetResource("NC:BookmarksRoot"); } RDFC.Init(BMDS, rTarget); var args = [{ property: NC_NS+"URL", literal: aFile}]; this.doBookmarksCommand(rTarget, NC_NS_CMD+"import", args); }, }PK es3cN  content/browse.xul PK 2content/contents.rdf chrome://memotoofirefox/content/memotoofirefoxOverlay.xul PK [(3ۖcontent/download.xul