diff --git a/config.js b/config.js index 4518c2c..ca075ab 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,7 @@ 'use strict'; exports.id = 'com.add0n.native_client'; -exports.version = '0.4.5'; +exports.version = '0.4.6'; exports.ids = { chrome: [ @@ -34,7 +34,6 @@ exports.ids = { 'dbghnkdojpkebjbddhhjfjgapoolnikh', // Send to MPV (Opera) 'nglfpmpeljnfooojieocihijkeokinno', // Edit with VIM (Chrome) 'ajcbbbkgmbinpbkllamhphpgpgdabnhf', // Edit with VIM (Opera) - 'oafkneibbejlfadcdcjglkpdhmjnlfhl', // TEST ], firefox: [ '{3e0ac434-26e0-4c03-b757-3078486800c3}', // Send to VLC diff --git a/messaging.js b/messaging.js index a6970ed..b78cb89 100644 --- a/messaging.js +++ b/messaging.js @@ -19,7 +19,7 @@ function Input() { this._readableState.objectMode = true; // Unparsed data. - this.buf = new Buffer(0); + this.buf = Buffer.alloc(0); // Parsed length. this.len = null; } @@ -81,8 +81,8 @@ function Output() { util.inherits(Output, stream.Transform); Output.prototype._transform = function(chunk, encoding, done) { - const len = new Buffer(4); - const buf = new Buffer(JSON.stringify(chunk)); + const len = Buffer.alloc(4); + const buf = Buffer.from(JSON.stringify(chunk), 'utf8'); len.writeUInt32LE(buf.length, 0);