Support local matching on Firefox

Currently BrowserSelector addon for Firefox calls BrowserSelector Native Messaging Host for all requests. It slows down Firefox's performance basically. We should skip such a remote call if unnecessary for better performance.

Here is an idea:

  • The Native Messaging Host returns ZonePatterns information as a part of its configs.
  • Firefox addon does local match for URLPatterns and HostNamePatterns based on the logic same to Chrome and Edge extensions.
  • Firefox addon calls the Native Messaging Host when ZonePatterns is not empty. Otherwise it returns the matching result immediately.

These changes look to improve the base performance. How about this idea?

Edited by YUKI "Piro" Hiroshi