native-messaging-nodejs 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE.txt +13 -0
  2. package/README.md +20 -0
  3. package/package.json +2 -2
package/LICENSE.txt ADDED
@@ -0,0 +1,13 @@
1
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2
+ Version 2, December 2004
3
+
4
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
5
+
6
+ Everyone is permitted to copy and distribute verbatim or modified
7
+ copies of this license document, and changing it is allowed as long
8
+ as the name is changed.
9
+
10
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
+
13
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ Node.js Native Messaging host
2
+
3
+ Installation and usage on Chrome and Chromium
4
+
5
+ 1. Navigate to `chrome://extensions`.
6
+ 2. Toggle `Developer mode`.
7
+ 3. Click `Load unpacked`.
8
+ 4. Select `native-messaging-nodejs` folder.
9
+ 5. Note the generated extension ID.
10
+ 6. Open `nm_nodejs.json` in a text editor, set `"path"` to absolute path of `nm_nodejs.js` and `chrome-extension://<ID>/` using ID from 5 in `"allowed_origins"` array.
11
+ 7. Copy the file to Chrome or Chromium configuration folder, e.g., Chromium on \*nix `~/.config/chromium/NativeMessagingHosts`; Chrome dev channel on \*nix `~/.config/google-chrome-unstable/NativeMessagingHosts`.
12
+ 8. Make sure `node` executable and `nm_nodejs.js` are executable.
13
+ 9. To test click `service worker` link in panel of unpacked extension which is DevTools for `background.js` in MV3 `ServiceWorker`, observe echo'ed message from Node.js Native Messaging host. To disconnect run `port.disconnect()`.
14
+
15
+ The Native Messaging host echoes back the message passed.
16
+
17
+ For differences between OS and browser implementations see [Chrome incompatibilities](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities#native_messaging).
18
+
19
+ # License
20
+ Do What the Fuck You Want to Public License [WTFPLv2](http://www.wtfpl.net/about/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-messaging-nodejs",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Node.js Native Messaging host",
5
5
  "keywords": [
6
6
  "Native Messaging",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "git+https://github.com/guest271314/native-messaging-nodejs.git"
15
+ "url": "git+https://38112114github.com/guest271314/native-messaging-nodejs.git"
16
16
  },
17
17
  "license": "SEE LICENSE IN LICENSE",
18
18
  "author": "guest271314",