Flagfox 6.1 Beta 3

The third and final Flagfox 6.1 beta is ready for testing. You can now download and install from the downloads page here (it will not auto-update from the first beta, but will auto-update to the final release).

Flagfox 6.1b3 changelog:

  • Added support for importing actions into options from prefs/actions JSON files
  • Replaced now-defunct URL Parser default action with simple built-in JS action
  • Fixed error message spew from hotkey migration on startup (regression in 6.1 beta)
  • Various code cleanups/fixes

Flagfox 6.1b2 changelog:

  • Added local caching for all favicons (uses localStorage; clears with cache clear)
  • Added throttling to favicon fetching while editing an action’s template
  • Reimplemented default icon loading for missing favicons in menus
  • Fixed handling of raw IPs (e.g. router admin pages; regression in 6.1 beta)

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

The new import from JSON file works just like the old import works, by dragging/dropping the file (e.g. from desktop/wherever) onto the actions list in the Flagfox options. The format can be any of the 3 supported by Flagfox: the format the default actions JSON file is in, the format the user actions preference is in, or the format the WebExt preferences storage file is in. Note that if it’s not the full format (the first in that list), old default actions can’t be imported, because they’re not actually saved in the user pref (which saves a lot of space). Yes, this means you can take any Flagfox 5.2+ storage.js file from your Firefox profile and dump it into Flagfox 6.1+, and it’ll figure it out and import it as a pile of new custom actions. (you can, of course, delete any you didn’t want, afterwards) The old text list format is still supported, and can still be from a file or a copied/pasted/dragged text selection.

Important: There are a couple dozen people in this beta test now, but not one of you has actually provided any feedback. If nobody actually tests the custom hotkey support on a Mac, then I’m going to have to release it in its current “¯\_(ツ)_/¯” state. Thus far, the only use I’ve gotten from this beta is me learning how to sign XPIs for off-AMO hosting so I can test in my main profile. Even with Mozilla killing off the AMO beta channel, this getting so much less testing than all past betas is a bit disappointing. :/

Known Issues:

  • Keyboard shortcuts are limited to one of Ctrl/Alt (or Command, on Mac), potentially Shift, with a character key. (WebExt API restriction)
  • Keyboard shortcuts have not yet been tested on a Mac.
  • There is a limit of 100 keyboard shortcuts allowed at one time.

(See first post for more detail on the keyboard shortcut known issues.)

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 version. Also, please only use the latest beta version, which unfortunately must be done manually due to Mozilla killing the beta channel.

Advertisements

Flagfox 6.1 Beta 2

The second Flagfox 6.1 beta is ready for testing. You can now download and install from the downloads page here (it will not auto-update from the first beta, but will auto-update to the final release).

Flagfox 6.1b2 changelog:

  • Added local caching for all favicons (uses localStorage; clears with cache clear)
  • Added throttling to favicon fetching while editing an action’s template
  • Reimplemented default icon loading for missing favicons in menus
  • Fixed handling of raw IPs (e.g. router admin pages; regression in 6.1 beta)

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

The main changes in beta 2 are bugfixes and better handling of favicons. All previous versions of Flagfox relied on Firefox to handle the caching of action favicons. It had a tendency to check for updates to those icons way too often, and I think (not 100%) it is a little worse since the transition to WebExt. Including the default actions’ favicons in the installer is not really viable, due to the insane state of copyright law. What I’ve written here is a caching system that uses local storage. It’s not the same “storage” API as in WebExt; it’s using the “storage” API usable via websites. (:sigh: name your APIs better, people…) The former is uses for addon prefs and the latter is being used here for persistent caching. Note that this cache is cleared along with other browser caches when manually clearing your cache, as is intended. I have this new system set to only check for favicon updates once every 30 days, at the moment (I might extend this). An additional reason for doing all of this is that it makes it easy to reimplement support for showing a default icon in the menus when none is available, which was a feature that I dropped in the WebExt transition, as there was no easy way to do that anymore. (Flagfox 5.2.x just listened for an error on trying to load the image; the WebExt API provides no way to do this for menus, though the options page still did this)

Known Issues:

  • Keyboard shortcuts are limited to one of Ctrl/Alt (or Command, on Mac), potentially Shift, with a character key. (WebExt API restriction)
  • Keyboard shortcuts have not yet been tested on a Mac.
  • There is a limit of 100 keyboard shortcuts allowed at one time.

(See previous post for more detail on the keyboard shortcut known issues.)

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 Mozilla killing the beta channel.

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.

Flagfox 6.1 will require Firefox 60+ and actually have most of its capability back

Mozilla seems to finally be getting around to implementing WebExtension APIs that they should’ve had working half a year before setting the ecosystem on fire and banning old APIs. Firefox 60 is looking to be closer to what Firefox 57 should’ve been. It’ll even be an ESR. Of important note, two very important APIs have finally been added:

  • Dynamic keyboard shortcuts – The WebExt API only allowed for static keyboard shortcuts to be specified in the addon’s built-in manifest file. Flagfox 6.0 just has a greyed-out hotkey input field in its action customization dialog, complete with the text “No Firefox 57+ support”, because this was so pathetic that I didn’t even want to hide it. All I could have was an unchangeable built-in shortcut for Geotool. I will now be able to re-implement keyboard shortcuts properly. Note that if you had custom keyboard shortcuts previously, Flagfox 6.0 doesn’t show them (because they can’t work), but they’re still saved and I should be able to revive them in Flagfox 6.1.
  • An actual DNS API – The WebExt API only provided IP addresses for uncached web requests on domains not accessed recently, and they’re only available if an addon is actively listening for them. Someone filed a bug report about web requests having blank IPs for previously seen domains around 7 months ago, but it has been largely ignored (and this change doesn’t fix that). This resulted in an inordinate number of problems and I had to write my own caching system to handle this. It’s not ideal, and I still haven’t finished improving it to handle all use-cases, as it’s a freakin’ headache. Caching things isn’t that hard; properly clearing those cached things when no longer needed, thus not creating an endless memory leak, is another matter. This was a pain to debug and the inability to get cached IPs from Firefox meant first-startup couldn’t show flags yet. Now that they finally added an API similar to what all older versions of Flagfox used, I can actually change things to be reliable again, work fully on first install/startup, and not occasionally forget flags when Firefox’s cache doesn’t agree with my cache that something was obsolete. It’s about damn time.

I’ve also seen some stuff indicating other improvements I may be able to use, but I’m not sure exactly what Firefox version they land in. The two above are the very clear big important ones, however.

Unfortunately, Mozilla killed the addon beta channel as part of their apparent quest to make developing addons more cumbersome, so doing an alpha/beta test will be a bit of a pain, this time around. I’ll look into things further and post something here at some point. ETA TBD.

The AMO beta channel has been removed

For anyone who (actually) reads what I post here, just a quick note: Mozilla removed the beta channel from Mozilla Add-ons. (The actual timing was delayed from the date of their post. I’m not sure exactly when the change actually went live.) This means that for all addons which used this feature, they no longer have a simple method to have users test addon pre-releases via AMO. Flagfox 6.0 was my most recent use of this system, and it was invaluable. All users who had installed any beta channel version should automatically be updated to the latest stable channel version. Just to be clear, this applies to every addon Mozilla hosts on AMO, not just Flagfox.

I may do another Flagfox alpha/beta in the future, as I have done multiple times in the past, but it’ll require more time and effort, and will have a little less visibility. If/when I do so, this irregularly used blog is where I’ll announce it.

On an unrelated note: The Flagfox 6.0.x and 5.2.x monthly updates are pending, and as usual will be available at the end of the month. I’ve been considering switching from an end-of-month schedule back to a mid-month schedule, but I’ve simply not actually done so yet. Maybe probably next month.

Flagfox 6.0 release candidate

Prior posts: 6.0b1, 6.0b2, & 6.0b3.

Flagfox 6.0rc1 has been posted to AMO’s beta channel for people to test. Everyone who is already signed up for the Flagfox beta channel should automatically get the update. If nothing explodes too drastically, this will be the version released to the main update channel, shortly. The only differences between 6.0rc & 6.0 release should be the lack of an “rc” in the version field and a different first-run URL. If you’re in the beta and leave this new update installed, you’ll get future beta updates; if you install the final release version, you’ll only get main release updates.

Note: Due to short litany of problems with the WebExtension API under Firefox 56, the soft minimum required Firefox version will be set to Firefox 57 on AMO. The addon itself will technically be installable in 56, but the site won’t suggest it. I may or may not change that in the future.

There’s a bunch of fixes since the 3rd beta, but nothing particularly drastic. I made an attempt at getting the more complex host-IP cache needed to have IPs be accessible to the new in-page Flagfox menu actions, but I don’t want to delay releasing a stable working version to the main channel if I now have it, seeing as it’s a month and a half overdue to run in current Firefox (non-ESR).

Flagfox 6.0rc1 changelog:

  • Disabled actions that need a content script on protocols and Mozilla domains blocked by the WebExt API
  • Added domain names of actions (that have a URL) to their tooltips in the options page
  • Fixed keyboard affecting main options page while a subdialog is open (e.g. actions list selection)
  • Fixed custom action deletes not removing the item from the menu immediately
  • Changed options page to autosave actions JSON to storage rather than wait for tab close
  • Fixed icon/tooltip updating for error pages
  • Fixed TLD nationality not showing in tooltip for mismatch notification blacklisted ccTLDs
  • Changed TLD nationality to always show for nation-restricted non-ccTLDs (IDN TLDs require Firefox 57+)
  • Fixed Geotool keyboard shortcut
  • Added Online Video Converter to default actions list (not in menu by default)

Changelogs for the beta releases preceding this are 6.0b1, 6.0b2, & 6.0b3.

Remaining known issues:

  • The new page element action menus do not yet support actions that use IP addresses (WIP; implementation TBD)
  • A few RTL issues (always expected; Arabic and Hebrew users are probably used to seeing this in all software)
  • Options edit action dialog autocomplete and help popup are disabled (cut for time; will reimplement later)
  • Options page is kinda ugly, due to having to port to HTML and CSS being horrible (and me sucking at it)
  • All page notifications for TLD/IP country mismatches have been disabled until I can make it work better

The only real outright bugs (aside from the results of me sucking at CSS) are in RTL locale handling, which I will get to over time. Getting the full help popup working shouldn’t take too long, so I’ll see if I can prioritize that for 6.0.1. Getting the notifications to not be crap will require me to ditch the WebExtension notifications API and try to write my own custom system, if that’s even possible, so no clue on the timeline for that.

Bug reports / feedback can be posted in a comment to this post or to the thread on the support forum. You can also email me or send me a tweet or whatever. Comments for old beta posts here will be locked; please post to the new one, so we can keep track of what’s applicable for what version.

Lastly, THANK YOU to everyone who installed the beta. I have gotten useful bug reports which have resulted in fixes for things I would’ve missed without the beta, so it’s definitely been worth it. Please don’t stop reporting new issues if you find them.