-
AIO Search Toolbar 1.3 :: Add-ons for Firefox –
AIO Search Toolbar 1.3 :: Add-ons for Firefox –
#Firefox #Search #toolbar -
Firefox chrome function : Read/write file on disk
tested on Firefox 7.0.1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
const Ci = Components.interfaces; const Cc = Components.classes; function ReadWrite( data ){ try{ Components.utils.import("resource://gre/modules/NetUtil.jsm"); Components.utils.import("resource://gre/modules/FileUtils.jsm"); var file = FileUtils.getFile("ProfD", ["FileName.txt"]); var ostream = FileUtils.openSafeFileOutputStream(file ); var converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]. createInstance(Ci.nsIScriptableUnicodeConverter); if( data ){ if ( !file.exists() ){ file.create( Ci.nsIFile.NORMAL_FILE_TYPE, 420); } converter.charset = "UTF-8"; var istream = converter.convertToInputStream(data); NetUtil.asyncCopy(istream , ostream, function(status) { if (!Components.isSuccessCode(status)) { alert( "Error! :" + status ); return false; } }); }else{ var data = ''; var fstream = Cc["@mozilla.org/network/file-input-stream;1"]. createInstance(Ci.nsIFileInputStream); var cstream = Cc["@mozilla.org/intl/converter-input-stream;1"]. createInstance(Ci.nsIConverterInputStream); fstream.init(file, -1, 0, 0); cstream.init(fstream, "UTF-8", 0, 0); // you can use another encoding here if you wish let (str = {}) { let read = 0; do { read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value data += str.value; } while (read != 0); } cstream.close(); // this closes fstream return data; } }catch(e){ // alert( e); return false; } }
-
Firefox chrome function : Read/write file on disk :: GadElKareem –
Firefox chrome function : Read/write file on disk :: GadElKareem –
#Firefox #jsFirefox chrome function : Read/write file on disk :: GadElKareemgadelkareem.com
tested on Firefox 7.0.1 const Ci = Components.interfaces; const Cc = Components.classes; function ReadWrite( data ){ try{
-
Use Firefox 4 with our Torrent Finder Toolbar –
Use Firefox 4 with our Torrent Finder Toolbar – #firefox
Torrent Finder Firefox Toolbar V 1.3 :: Torrent Finder :: Torrent Search Enginetorrent-finder.info
Torrent Finder Firefox Toolbar enables all Torrent Finder search functions from your own Firefox browser. You can search single or multiple search engines opening them in Torrent Finder search tabs, s
-
so again what’s the relation between Firefox and aliens?
so again what’s the relation between Firefox and aliens? #Firefox
