Skip to content

Instantly share code, notes, and snippets.

@davidtheclark
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidtheclark/f0443e93caf25bffe497 to your computer and use it in GitHub Desktop.
Save davidtheclark/f0443e93caf25bffe497 to your computer and use it in GitHub Desktop.
available browser info module idea

There are several modules that do the following:

  1. locate available browsers on the current machine;
  2. do something with that information.

Usually #2 is "launch the browser with some specific content", but not always.

The modules I have in mind (of course there may be more!) are:

What I noticed is that each of these modules hosts a similar set of information about how to find browsers and parse versions on different platforms. See:

That means that each of them has to maintain their information sets independently. Meanwhile, if another module comes along that wants to do something different with available local browsers, it will have to reproduce the information set in its own way.

I wonder if that information set could be pooled into a shared module? Everybody would get the accurate info; if a bug like "Doesn't find Firefox on Windows..." is fixed in the shared module, everybody benefits; and new modules could use it to whatever ends they want.

If not sure if the module should just be an object of information or if it should also have some functionality. Seems plausible to me that each plugin would want to independently control how it uses the information to actually find (and probably run) the browser (?).

At least one problem: I have no idea how to make automated test this kind of thing.

@davidtheclark
Copy link
Author

@airportyh: I wonder what kind of bug that could be ... seems that the goal would be to include only the information that everybody trying to locate a browser on a system would need, while any other information that is specific to one module and might upset other modules would be kept out?

@4kochi: Maybe just need to add to the list already started with:
https://github.com/hughsk/chrome-location
https://github.com/hughsk/firefox-location

@davidtheclark
Copy link
Author

Started work here https://github.com/davidtheclark/locate-browsers — along with its supporting browser-specific modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment