You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- No longer uses command-line version flags or version numbers found in the registry or elsewhere. This simplifies the process and makes the version numbers consistent and more detailed.
Copy file name to clipboardExpand all lines: readme.md
+3-8Lines changed: 3 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,14 @@
14
14
-[API](#api)
15
15
-[CLI](#cli)
16
16
-[Install](#install)
17
-
-[Changelog](#changelog)
18
17
-[Background](#background)
19
18
-[License](#license)
20
19
21
20
</details>
22
21
23
22
## Usage
24
23
25
-
**If you are upgrading:** please see [the changelog](#changelog).
24
+
**If you are upgrading:** please see [the changelog](CHANGELOG.md).
26
25
27
26
```js
28
27
constdetect=require('win-detect-browsers')
@@ -48,7 +47,7 @@ detect(['chrome', 'firefox'], function (err, browsers) {
48
47
49
48
### `detect([names, ]callback)`
50
49
51
-
`names` is an array of browser names you want to find. If omitted or empty, it will detect *[everything](http://youtu.be/k1yvvNvlXtg)*. The `callback` receives an error if any and an array of `results`. A result is excluded if its path has no `.exe` extension or if its version could not be read.
50
+
`names` is an array of browser names you want to find. If omitted or empty, it will detect _[everything](http://youtu.be/k1yvvNvlXtg)_. The `callback` receives an error if any and an array of `results`. A result is excluded if its path has no `.exe` extension or if its version could not be read.
52
51
53
52
Each `result` is an object with the following properties:
54
53
@@ -338,13 +337,9 @@ npm install win-detect-browsers # For API
338
337
npm install win-detect-browsers -g # For CLI
339
338
```
340
339
341
-
## Changelog
342
-
343
-
*The changelog has moved to [CHANGELOG.md](CHANGELOG.md).*
344
-
345
340
## Background
346
341
347
-
Browser detection on Windows can't be done right. This is the *try-everything-and-fail-silently* approach. It accounts for architecture differences, normalizes environment variables, tries default locations, searches the registry (in the HKLM and HKCU hives as well as WoW counterparts) (including [Start Menu Internet Applications](http://msdn.microsoft.com/en-us/library/windows/desktop/dd203067(v=vs.85).aspx), Google Updater and more), and looks in `PATH`. Version numbers are then read from the executable metadata.
342
+
Browser detection on Windows can't be done right. This is the _try-everything-and-fail-silently_ approach. It accounts for architecture differences, normalizes environment variables, tries default locations, searches the registry (in the HKLM and HKCU hives as well as WoW counterparts) (including [Start Menu Internet Applications](http://msdn.microsoft.com/en-us/library/windows/desktop/dd203067(v=vs.85).aspx), Google Updater and more), and looks in `PATH`. Version numbers are then read from the executable metadata.
348
343
349
344
`browser-launcher` by substack has [poor Windows support](https://github.com/substack/browser-launcher/issues/7), and it prompted me to create this module. It is now used in [browser-launcher2](https://github.com/benderjs/browser-launcher2), ~~an active~~ a once active fork of `browser-launcher`.
0 commit comments