diff --git a/config.js b/config.js index f6f4723..646615f 100644 --- a/config.js +++ b/config.js @@ -63,7 +63,6 @@ exports.ids = { 'mgmnomlncpmfgelhofilonnecmbdaoia', // Open in Brave (Chrome) [By @brian-girko] 'pfenoignchfmjmphnpfihgockdhejcjf', // Open in Sumatra (Chrome) 'ojmcfmboidiokgkgmilnmjnjkdbgakpn', // Open in Sumatra (Opera) - 'alighchillgifpgaigbgnmhnndoecalj', // TESSST ], firefox: [ '{b8fa78dd-dae1-4839-9d0e-ce5e213083ce}', // Open in GIMP diff --git a/host.js b/host.js index 80c2c79..67d68bb 100755 --- a/host.js +++ b/host.js @@ -20,7 +20,7 @@ let files = []; const sprocess = []; const config = { - version: '0.8.9' + version: '0.9.0' }; // closing node when parent process is killed process.stdin.resume(); diff --git a/messaging.js b/messaging.js index 518c034..b78cb89 100644 --- a/messaging.js +++ b/messaging.js @@ -82,7 +82,7 @@ util.inherits(Output, stream.Transform); Output.prototype._transform = function(chunk, encoding, done) { const len = Buffer.alloc(4); - const buf = new Buffer(JSON.stringify(chunk)); + const buf = Buffer.from(JSON.stringify(chunk), 'utf8'); len.writeUInt32LE(buf.length, 0); diff --git a/windows/install.bat b/windows/install.bat index 1e039a6..b454f15 100644 --- a/windows/install.bat +++ b/windows/install.bat @@ -2,38 +2,47 @@ SET PATH=C:\Windows\System32;%PATH% -ECHO .. Writting to Chrome Registry -ECHO .. Key: HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node -REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%LocalAPPData%\com.add0n.node\manifest-chrome.json" /f +IF EXIST "%~dp0\app\install.js" (GOTO :EXISTING) ELSE GOTO :MISSING -ECHO .. Writting to Chromium Registry -ECHO .. Key: HKEY_CURRENT_USER\Software\Chromium\NativeMessagingHosts\com.add0n.node -REG ADD "HKEY_CURRENT_USER\Software\Chromium\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%LocalAPPData%\com.add0n.node\manifest-chrome.json" /f +:EXISTING + ECHO .. Writting to Chrome Registry + ECHO .. Key: HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node + REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%LocalAPPData%\com.add0n.node\manifest-chrome.json" /f -ECHO .. Writting to Edge Registry -ECHO .. Key: HKEY_CURRENT_USER\Software\Microsoft\Edge\NativeMessagingHosts\com.add0n.node -REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Edge\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%LocalAPPData%\com.add0n.node\manifest-chrome.json" /f + ECHO .. Writting to Chromium Registry + ECHO .. Key: HKEY_CURRENT_USER\Software\Chromium\NativeMessagingHosts\com.add0n.node + REG ADD "HKEY_CURRENT_USER\Software\Chromium\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%LocalAPPData%\com.add0n.node\manifest-chrome.json" /f -ECHO .. Writting to Firefox Registry -ECHO .. Key: HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node -FOR %%f in ("%LocalAPPData%") do SET SHORT_PATH=%%~sf -REG ADD "HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f + ECHO .. Writting to Edge Registry + ECHO .. Key: HKEY_CURRENT_USER\Software\Microsoft\Edge\NativeMessagingHosts\com.add0n.node + REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Edge\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%LocalAPPData%\com.add0n.node\manifest-chrome.json" /f -ECHO .. Writting to Waterfox Registry -ECHO .. Key: HKCU\SOFTWARE\Waterfox\NativeMessagingHosts\com.add0n.node -REG ADD "HKCU\SOFTWARE\Waterfox\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f + ECHO .. Writting to Firefox Registry + ECHO .. Key: HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node + FOR %%f in ("%LocalAPPData%") do SET SHORT_PATH=%%~sf + REG ADD "HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f -ECHO .. Writting to Thunderbird Registry -ECHO .. Key: HKCU\SOFTWARE\Thunderbird\NativeMessagingHosts\com.add0n.node -REG ADD "HKCU\SOFTWARE\Thunderbird\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f + ECHO .. Writting to Waterfox Registry + ECHO .. Key: HKCU\SOFTWARE\Waterfox\NativeMessagingHosts\com.add0n.node + REG ADD "HKCU\SOFTWARE\Waterfox\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f -pushd "%~dp0" -CD app + ECHO .. Writting to Thunderbird Registry + ECHO .. Key: HKCU\SOFTWARE\Thunderbird\NativeMessagingHosts\com.add0n.node + REG ADD "HKCU\SOFTWARE\Thunderbird\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f -IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( - ..\node\x64\node.exe install.js "%LocalAPPData%" -) ELSE ( - ..\node\x86\node.exe install.js "%LocalAPPData%" -) + pushd "%~dp0" + CD app -PAUSE + IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( + ..\node\x64\node.exe install.js "%LocalAPPData%" + ) ELSE ( + ..\node\x86\node.exe install.js "%LocalAPPData%" + ) + + GOTO :COMMON + +:MISSING + ECHO To run the installer, please first unzip the archive + +:COMMON + PAUSE