Flagfox 6.1 Beta 1

Mozilla finally added some rather crucial missing WebExtension APIs, about a year late, and Flagfox 6.1 now takes advantage of them to reimplement some of the major features that were forced to be dropped in Flagfox 6.0. Firefox 60+ is required. This is still an experimental development version, so the standard beta warning to backup your stuff applies, but it’s not likely to hurt anything (occasionally backing up your browser profile(s) is just good advice, in general). Whilst this beta is available due to new features added by Mozilla, it’s also hindered by yet more features eliminated by Mozilla: they removed the beta channel from AMO. I feel like they often do everything in their power to make this more difficult… (intentional, or not). Nonetheless, AMO at least supports signing of off-site WebExtensions, so these versions are code signed and will work in a normal release version of Firefox without special configuration. Automatic beta updates are not available, however, once a future release version of Flagfox 6.1+ is available, it should automatically update to that and function normally thereafter (“should” being the operative word). This first beta file is available to download and install from the downloads page here.

Of course writing this took longer than expected; nothing new there. Fiddling with hotkey input was particularly annoying because Mozilla added an API to update a shortcut at runtime, but didn’t actually create an API to validate such a shortcut. Triggered shortcuts can also be intercepted via one event when trying to input them, but not another, and inconsistently, at that. What’s worse, setting it to a test binding is not 100% reliable either, as it can in fact occasionally accept a shortcut it won’t allow. Thus is the standard downfall of artificial APIs: nobody who makes them actually uses them in any real scenario, resulting in easily missed bugs and necessities. Of course everything is even less reliable when recycling somebody else’s API, as in the case with Mozilla basing their WebExtension API on Google Chrome’s. At least they’re willing to diverge from it, when necessary, now.

Flagfox 6.1b1 changelog:

  • Reimplemented support for fetching IPs from the DNS cache, instead of only requests (new WebExt API)
  • Reimplemented support for customizable hotkeys for actions, instead of just one default (new WebExt API)
  • Reimplemented action availability check on menu open, instead of all tab changes (new WebExt API)
  • Improved startup to attempt to load icons into existing tabs, where possible
  • Rewrote IP/host cache, yet again (having the DNS API makes things way less complex now)
  • Added support for all action types in context menus, where now possible (IPs obtainable via DNS cache)
  • Changed hotkey pref save format to match new API; old ones from Flagfox 5.2.x will be imported
  • Added detection and indication of invalid or existing hotkeys, when setting (not 100%, due to iffy API)
  • Added ability to undo a hotkey change without having to cancel config, via escape key
  • Switched to PointerEvents where applicable (only minor use)
  • Improved opening of new tabs to use openerTabId; now opened next to subject, instead of end of strip
  • Support for Tree Style Tabs addon (and similar) is now available again due to openerTabId change
  • Dropped now-defunct XMarks action from defaults
  • Various code cleanups
  • Dropped support for Firefox 56-59, as Mozilla only finally added the new APIs used here in Firefox 60

Known Issues:

  • Keyboard shortcuts are limited to one of Ctrl/Alt (or Command, on Mac), potentially Shift, with a character key. Using Ctrl and Alt at the same time is not supported by Firefox, here. The restriction to character keys is the same as prior versions, however. I might add F-key support, but so many combos with those are tied to OS functions that I think I’ll just consider it not worth the risk of accidents. In addition to the ones that are used as built-in Firefox shortcuts, most punctuation keys are also not supported by the API. The total list of allowed keys is: A-Z, 0-9, Space, Period, Comma. If you’ve got a keyboard that can produce any other single non-punctuation character, it might work, but I have no idea.
  • Keyboard shortcuts are, not surprisingly, something which can vary based on hardware. I don’t own a Mac, so this beta has not yet received any testing on that platform. The API documentation is poorly written with respect to the Command key, so reimplementing support here is a bit of a shot in the dark.
  • There is a limit of 100 keyboard shortcuts allowed at one time. The new API only technically allows updating an existing shortcut defined in the install manifest, not actually adding a new one. The obvious solution is just to add a pile of generic placeholders in there and modify as-needed. That said, if you actually manage to encounter this limit… how? Seriously, did anyone ever use hotkeys this much in Flagfox 5.2? Anyway, I expect this is plenty; just noting it here for completeness.
  • Added 2018-6-14: Icons aren’t working correctly on local raw IPs (e.g. router admin pages).

As this is a beta test, bugs are always a possibility and should be reported in a comment below or via any other contact method. Please don’t assume an issue is known unless I state so in a blog post somewhere here. I’ll update this blog post with any significant known issues discovered before posting the next beta version. Also, please only use the latest beta version, which unfortunately must be done manually due to the killed beta channel, as previously mentioned. Setting up an alternative update server is technically possible, but I don’t have any such system set up, so just using the blog is fine. You can subscribe to this blog via a link off to one of the sides of this page, if you’d like. I will also attempt to remember to post links to these blog posts on Twitter, if you’re willing to put up with whatever other crap I retweet there.

Advertisement