Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #8 from dindog/master

  • Loading branch information...
commit 8ed48d7a039d584ba2219be07c74e67c7b34725c 2 parents ff19024 + e32b6f4
Greg Parris supahgreg authored
6 extension/content/js/newscript.js
View
@@ -87,8 +87,10 @@ function doInstall() {
// put this created script into a file -- only way to install it
var tempFile = Scriptish_getTempFile();
var foStream = Scriptish_getWriteStream(tempFile);
- foStream.write(script, script.length);
- foStream.close();
+ var converter = Instances.cos;
+ converter.init(foStream, "UTF-8", 0, 0);
+ converter.writeString(script);
+ converter.close(); // this closes foStream
// create a script object with parsed metadata,
script = Scriptish_config.parse(script);
2  extension/modules/constants.js
View
@@ -38,6 +38,8 @@ var Instances = {
.createInstance(Ci.nsISupportsString),
get suc() Cc["@mozilla.org/intl/scriptableunicodeconverter"]
.createInstance(Ci.nsIScriptableUnicodeConverter),
+ get cos() Cc["@mozilla.org/intl/converter-output-stream;1"]
+ .createInstance(Ci.nsIConverterOutputStream),
get timer() Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer),
get wbp() Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]
.createInstance(Ci.nsIWebBrowserPersist),
Please sign in to comment.
Something went wrong with that request. Please try again.