496 points · by ac29 · 8y ago · 236 comments
Starting with Firefox 59, several protocols that support decentralized architectures are available for use by extensions. The white-listed protocols are:
+ Dat Project (dat://)
+ IPFS (dweb:// ipfs:// ipns://)
+ Secure Scuttlebutt (ssb://)
so basically the explanation is simple. There is a whitelist of protocols you can have your WebExtension take over.
If the protocol you want to control is not on that whitelist such as an hypothetical "catgifs:" protocol, you need to prefix it like: "web+catgifs" or "ext+catgifs" depending if it will be used from the Add-on or by redirection to another Web page. This makes it inconvenient to use with lots of decentralization protocols because in many other clients we are already using urls such as "ssb:" and "dat:" (eg, check out beaker browser). In essence this allows us to implement many new cool decentralization features as add-ons now that we can take over protocols, so, you could be in Firefox browsing the normal web and suddenly see a "dat:" link, normally you'd need to switch clients to a dat enabled app, now, you can have an add-on display that content in the current user-agent you're using.
Still, there is another feature that we need before we can start really implementing decentralization protocols as pure WebExtensions, we need both TCP and UDP APIs like we had in Firefox OS (as an example, Scuttlebutt uses UDP to find peers in LAN and its own muxrpc TCP protocol to exchange data, DAT also uses UDP/TCP instead of HTTP).
I have been building little experiments in Firefox for interfacing with Scuttlebutt which can be seen at:
https://viewer.scuttlebot.io/%25csKtp9VmxTjJoKy17O7GA6%2F3S8...
https://viewer.scuttlebot.io/%25uBev5w8m8iZGVbQDo9fpr%2BCXLB...
I hope to start a conversation in the add-ons list about TCP and UDP APIs for WebExtensions soon :-)
https://ssbc.github.io/scuttlebutt-protocol-guide/#handshake
In essence, your connection to a given peer is encrypted in a way that only you both have the keys, even if someone breaks that key (such as the peer being a bad agent) it would not compromise your connection with other peers as they will use different keys. It is quite an awesome protocol.
However, I find the concept of the scheme whitelist pretty strange in context of WebExtensions.
Of course it makes sense that http:, https:, data:, blob:, etc should be off-limits for extensions. But on the other hand, I'd think that the primary use-case of registering protocol handlers in extensions is to handle existing links - something that the ext+/web+ rule seems to be particularly designed to disallow.
Apparently, the actual handler whitelist for WebExtensions can be found at [1]. It looks pretty... arbitrary?
For example, it's amazing to see that magnet: irc:, ssh: and gopher: are on there, but then why not ftp:, ws: or even steam:? There could be some useful extensions intercepting those as well.
Likewise, while the inclusion of scuttlebutt, ipfs etc is very good news, what makes them eligible now that didn't make them earlier?
Generally, I'd like to know by what process is that whitelist managed and what are the criteria to get on there.
(I understand it's derived from the official HTML5 whitelist [2]. To be honest, that one looks even more arbitrary - but of course has different security considerations, as it defines an API for the open web. The two lists also seem to have some differences, as e.g. gopher: isn't on the HTML5 whitelist while openpgp4fpr: is not on the extensions list.)
[1] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/ma...
[2] https://html.spec.whatwg.org/multipage/system-state.html#cus...
This would allow us to (again) associate the Firefox browser with for example .maf files and have them displayed in the browser via the extension. (I'm sure there must be thousands of archived pages out there that currently are a hassle to view - it would be great to get support for those).
I know it's theoretically possible to make some browsers respect ssh:// urls. But to actually do so requires a lot of work.
Presumably this is to avoid some security problem that I'm not immediately aware of. Or maybe just plain caution?
Practically, though, you still have the problem of actually making the connection; there's no API for that yet.
We're still hoping to get full protocol-handling with an API similar to https://github.com/electron/electron/blob/v1.8.2-beta.3/docs...
The more pressing concern is how you would speak these protocols because there's still no direct socket support. In my case, the addon just acts as a history and redirect shim and my server does the actual server access and translation. I'm actually thinking of cobbling together a native messaging-based extension as a stopgap since obviously this is suboptimal.
YMMV, but as someone who was stuck on ESR for a long time for this reason I am now completely satisfied on 57.
I find that :reloadall helps my sanity a lot if I'm navigating through lots of already open tabs, and I've just about got used to using <C-Tab> rather than gT.
We're trying to extend web-extensions to get around the limitations [1], but progress is slow.
I used to be one of the users, but after the millionth time that an upgrade broke the extension I gave up on being able to use it.
I don't think about it often but even though I am mostly over it I get a little sad thinking about it. But only a little.
I've also stopped using tiling window managers.
Most of my time is spent either reading in the browser, writing code or typing in the terminal. I have sufficiently few windows most of the time that alt + tab does the job just fine. I prefer tabbing between windows now because it gives me bigger windows and more flexibility.
I think the scroll wheel is better for web browsing than hjkl.
But my code I will still often edit with Vim, though I sometimes use an IDE also.
qafnextq20@aAnd, ideally, we should see extensions upturning the interaction model as users experiment with alternatives; that this is no longer possible, that the fundamental model is defined and hardcoded (with minor flavour differences), is, I think, a significant loss.
Its a shame there are few extensions like vimperator; its a greater shame there are none.
(b) Users went back and forth between than and pentadactyl for a while, and both have the same issues in a webextension world
(c) There are more people who would like to use it but may not have due to the instability.
I've tried alternatives like Waterfox and Pale Moon, but Waterfox is incompatible with some sites, and Pale Moon is dog slow, so I reverted back to Firefox 56.
Not upgrading a browser is a scary situation to be in, but I just can't sacrifice the usability of Vimperator.
Yep, me too. I switched to Waterfox for the time being because of how important FireGestures is to me. If full-fledged mouse gestures extensions become available in Fx again, that would be a big step towards making the new Firefox usable for me.
Since you mentioned vimperator, another major issue for me is the lack of a VimFx style extension - that one is much simpler than vimperator or pentadactyl, and has other new attempts at alternatives, but 'Saka keys' is the one that seems to come closest (and makes this less of an issue than the mouse gestures one) and that's still kinda buggy and years behind VimFx in terms of features.
I would have missed Tab groups though it's not that big of a deal to me, but I'm glad we'd have that feature again. And another minor issue in that league is the lack of a good Speed Dial extension with a decent UI and set of features (which none of the "replacements" had last time I tried them out).
Awhile ago, I looked into making Firefox not do any tab management. Basically, always have one tab per window, middle click always opens a new window, normal click always opens a page in the current tab. (I'd like to do tab management with my window manager instead of browser so I can have a consistent tabbing interface across all of my applications.)
The few results I found googling around seemed to be mostly along the lines of "change these 14 prefs in about:preferences, install this addon to stop target:_blank, add these userstyles to hide the tabbar, don't open any internal FF pages, and check back with every new browser version".
Am I missing something that would make this easier, or is this really a thing that's just not really feasible? I can certainly understand that it's not a priority since almost no one needs to disable tabbing, but it also doesn't seem like that farfetched of a use case, nor would I imagine it would require much work to support.
When `tabs.onCreated` event is triggered, move the tab out of the window if it has more than one tab.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/AP... (onCreated)
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/AP... (windows.create see tabId param)
I found it novel but with most WMs, I found myself basically doing a very small number of fullscreen windows per workspace. This led me to my current Sway/i3 setup which seems to be working pretty well. Downside is gkrellm, which used to live in the dock (OpenBox), doesn't really fit in the new world order.
I'm also fairly certain that functionality could be implemented with a handful of scripts in awesome (in a floating way instead of using pre-existing tiling WM features).
https://i3wm.org/docs/userguide.html#_changing_the_container...
https://hackage.haskell.org/package/xmonad-contrib-0.13/docs...
You're not. This was one of jwz's big complaints when he wrote about why he doesn't use Firefox[1] several years back, and nobody has ever fixed it.
1. https://www.jwz.org/blog/2012/04/why-i-use-safari-instead-of...
More generally, some of the people I regularly interact with face-to-face are strongly focused on how they can use things for their financial advantage, while others aren't. Some even want to speculate with cryptocurrencies, which I consider gambling. I don't yet understand what explains the difference. Maybe a fear of running out of money to meet existential needs?
Anybody any ideas what makes seemingly very intelligent people so obsessed with money?
These changes look like they will eventually make things better, especially for extension developers and those of us who get to reap their benefits.
Keep up the good work, Mozilla.
It's weird that they are not mentioning Tree Style Tabs by name. But, at least they're listening the the user requests.
I don't use the plugin myself, but I heard that one of the gripes of the new WebExtensions version is that it still shows the normal horizontal tabs.
The legacy extension they are referring to is Tab Groups [0]. It allowed you to separate the tabs of a single session into groups. Selecting the active group would hide the other tabs.
[0] https://addons.mozilla.org/en-US/firefox/addon/tab-groups-pa...
That's for a good reason. I don't want a tab I can't see to record audio or video. Why would you want to?
If this is not possible or planned, it feels kind of broken in my view.
Wasn't it part of Firefox at one point? Or, am I misremembering.
I imagine it's the same tone they use for discussion of adblocker related features, "we need this for content blocking addons" rather than "we need this to support uBlock Origin."
Hiding the top tabs can be done in current versions but you have to go digging through settings folders and set up a css file with some rules. There's also a built-in header on the sidebar than can be hidden by similar means. Hopefully they'll also let us hide that header (it lets you switch to other sidebar views like Bookmarks and History that I don't want to use in the sidebar) so I can avoid the css setup in the future.
If someone was looking back at this post, they'd be missing part of the story.
Gangnam Style Tabs. I'd install it.
But yeah, no need to make an extension seem "official" to Firefox by mentioning it by name. Unless it's Pocket, obviously.
In case anyone is in this position, it's relatively easy to hide them with a userChrome.css file: https://superuser.com/a/1261661
It would be nice if the extension or an easy to find setting could do it, though.
It's crazy to me that Firefox's original selling point was tab management, and today Chrome's is so much better.
See the bottom of the table at https://wiki.mozilla.org/Community:SummerOfCode18 for more info and please apply if you want to see this added to Firefox! :)
Is this broken on a specific OS or under a specific window manager maybe? It might be worthwhile to file a bug, since it definitely should work.
I doubt it'll be in Fx60, but maybe son after? :)
TIL about ctrl selection in Chrome. I bet most people didn't know that either.
The main reason I won't upgrade firefox.
https://github.com/mthamil/Tab-Wheel-Scroll/issues/19
edit: there's hope!! https://bugzilla.mozilla.org/show_bug.cgi?id=1285812
Is that extension about changing the tabs with the wheel?
[1]: https://addons.mozilla.org/en-US/firefox/addon/tab-session-m...
The only way around it is to run a beta version or use the unpackaged unbranded versions manually.
I wouldn't count on power user features remaining for long given Mozilla's current target demographic.
Because any extension or sufficiently capable malware on your system can change about:config values, meaning that if Mozilla ever makes a mistake in the extension approval process and lets a malicious extension slip through, or you get such malware on your PC, then that extension/malware would be able to flip that config bit and open the flood gates for all malicious extensions. Mozilla would also not be able to change that config bit back in any trivial way, if they notice that they let a malicious extension through.
Only moving that configuration to the compilation step is able to prevent this for sure and most definitely is the sensible choice not just for Granny, but for most tech-savvy users as well, as even only a fraction of those care about unsigned extensions.
Months of public discussions have been held on if this can be done in a more (power-)user-friendly way without comprising security for the vast majority of users, who really do not care for unsigned extensions either.
Yes, these discussions would have concluded differently, if those 0.1% users who actually care about unsigned extensions made up 80% of Firefox users, but acting like this decision with a motivation that goes well beyond just wanting to not do as much maintenance is somehow indicative of how much Mozilla cares for its power users, is just ridiculous.
And just look at the malware fest that is the Chrome Store. This is what Mozilla was able to prevent by requiring extensions to be signed.
Lastly, specifically because they now have a functioning way of controlling malware, they can actually be a bit more liberal in what they allow to be configured via about:config and there is now no real use case anymore where it would make sense to move an about:config value to a compile flag.
If such a malicious extension or other malware got installed, it could already do anything another malicious unsigned extension could, so I don't see how having this setting weakens security under the assumption that there's already malicious code running.
If we assume a system is compromised, it may as well install other malware as normal binaries instead of a Firefox extension.
I get that Mozilla's response is, "Don't let the door hit you." But it can't pretend to still be for power users.
When writing an extension that shows a page action only for certain domains/URLs, this allows to replace about 15 lines of javascript code with a single line in manifest.json. Nice!
It's really a problem in general, there is no way to make an extension that customizes browser behavior itself (rather than page behavior), since WebExtensions can't do that.
Quitting Firefox and then starting again and restoring all tabs fits well with easy to undo.
Same with the backspace key activating the back button. Using these keystrokes for these purposes should be considered harmful.
Ctrl-Q is so harmful that I've long fantasized about hacking whatever driver in the kernel that controls the keyboard and having it ignore whatever signal the keyboard sends out whenever you press Ctrl-Q and not even pass it on to userspace.
tell application "Firefox"
set buttonStr to "Ooops"
set errMsg to "Close with ?-Q disabled. Use the menu."
display dialog errMsg buttons {buttonStr} cancel button buttonStr default button buttonStr with icon stop giving up after 5
end tell
I'd imagine similar options exist for other OSes. AutoHotkey for windows, maybe? Not sure what linux/x has by way of systemwide handlers that can both intercept and cancel propagation of offending bindings, though.So confirmation for Ctrl+Q is a must, there is no question about it. And if you don't want it - they can make an option that can turn it off.
Not only that, but it can take a significant amount of time to restart the browser and reload the tabs you had open.
So just in terms of time wasted, accidentally quitting the browser and having to restart it is awful and painful compared to just canceling the quit.
HN doesn't use those warnings. This reply was first written, then I quit and restored, and now I'll hit Send.
It's not binary. Both solutions can coexist as long as we choose the right tool for the job.
Reported: 9 years ago(!).
Yes, it's been deprecated for years, but that hasn't stopped the browser makers with majority of market share (Google > Chrome, Apple > Safari) from continuing to ship it along with the strictly worse alternative (IndexedDb).
Now that pretty much every language compiles to Javascript it's a shame to lose SQL functionality on the client. Shared model, shared validation, shared SQL layer, etc. -- it could all be a unified whole, but no, now one has to wait for sqlite-lite to be built on top of IndexedDb; that or throw everything out and go NoSQL on client and server.
not exactly sqlite-lite, but it's sqlish and it's build on top of IDB: https://github.com/google/lovefield
In a sibling comment I mentioned the fact that most languages compile to Javascript, the primary benefit being able to share code across client and server. So, if you've got a query DSL on the server that hooks into an SQL database you can use the same code on the client, hooking into an SQL database on the frontend.
All of the IndexedDb wrappers I've seen do essentially their own thing; in Lovefield's case, "The difference is that Lovefield does not accept raw SQL statements; instead, it has a builder-pattern API to build queries", which means it's effectively a client-side only solution if pure SQL is the output target of your query DSL.
The problem with Web SQL was that the spec was effectively just "whatever SQLite does". That isn't good enough for the Web. Imagine if the GIF specification had been "whatever GIFLIB does". Libraries like Lovefield can be built way faster than specifications can be written.
That may be true, but when said library uses a builder pattern rather than sql statements you can throw out all of your server-side query DSL code and waste time reimplementing everything on the client.
Since SQL has been around for several decades it's not surprising that mature server-side SQL libraries are available in abundance. And these days every language under the sun compiles to javascript -- wouldn't it be great to share the same query DSL code on client and server?
The answer is, emphatically, yes! Current state of affairs makes this virtually impossible to do in a widely supported manner.
sql.js[1] is a pure JS implementation of sqlite and it weighs a ton (2.6MB) compared to browser supplied native sqlite. Ideally the user doesn't have to pay the price of downloading a large binary (on top of already large SPA).
Mentat, for example, is built on sqlite, and in order to use it you have to run an Electron app. If there was a native version of sqlite (or other sqlite-like database) then there would be no such restriction.
It seems the best bet all of the above projects have for a friction-free implementation is WASM. When that's widely supported then one can ship whatever one wants (e.g. WASM sqlite) with their client-side application. Then, finally, it will be possible to use the same query DSL on client and server.
To perform efficient storage and querying of client-side data. I'm having a hard time understanding why one wouldn't want SQL in the browser given the alternatives.
> You cannot sync it to any SQL backend.
Sure you can, most client-side frameworks these days (React, Angular, ...) keep track of application state. On state change push to client and/or server database via REST API depending on network connectivity.
If your model is highly relational then it doesn't matter that querying for one entity is fast when what you really need is to, for example, efficiently join together multiple entities, grouping on N columns to produce some aggregate result. This is completely straightforward in SQL, but a convoluted inefficient, error prone mess in the alternative.
It's not ironic at all, it's just a good application of the extensible web manifesto : the browser support minimum necessary building blocs and then libraires can enhance the developer experience.
In that case, you have this https://google.github.io/lovefield/
The containers addon does grouping, sorting, color coding, auto group association, and sandboxed cookies. Is there something else you're looking for?
You select a container to open a new tab, then open what you want in it (type/paste link).
After you are on that URL in a container, the container control panel has an option to always open that domain (path too?) in that container. Check that.
Next time you paste a URL/link or follow a link to that domain, there will be an interim page asking you whether you want to open in the container the link came from, or the one you specified you always want it to open in. You can check a box to make that the default from then on.
Before I realized this is how it works, I was looking for a way to submit something like this as a feature request. After I realized it, the number of containers I used exploded, since I just default domains to always open in their containers and it's fairly transparent now.
As a real world example, I have a "Reddit" container, and a "Google - Personal" container (and a "Google - Work" for work G Suite stuff). I don't have Google default to anything (but I have some containerized pinned gmail tabs), but I do have youtube default to "Google - Personal". I have reddit default to "Reddit". I can view /r/videos and stream embedded and the views and tracking is in Reddit's container, but if I click to follow a youtube video to youtibe.com, it loads in the "Google - Personal" container and I can like or subscribe as I want.
At this point I have containers for banking, shopping, github+stackoverflow, facebook (I don't use it much at all, but at least this allows me to be logged in and worry less about tracking), Pandora, Reddit, Work/Home google, News (for a recent WaPo subscription), and I'm probably going to add a few more (including HN) within the next few weeks.
> Extensions can now override the proxy settings in the browser which has been another highly requested feature
I see that there's an opportunity here to improve the experience of using SOCKS in the browser. Pretty cool.
https://addons.mozilla.org/en-US/firefox/addon/proxyswitcher...
I'll probably be updating it in 59 to use this new API though. It almost completely removes the need for a settings page and should allow you to set all the complex proxy config you want using the firefox UI. It does seem to need a broader permission than I would have liked though.
https://blog.chromium.org/2017/03/reducing-power-consumption...
It seems more and more relevant these days with the advent of cryptocurrency miners.
https://hacks.mozilla.org/2018/01/firefox-58-the-quantum-era...
So no, we're quite a long ways away from having a real Tab Mix Plus replacement. Having said that, I have faith that we will eventually get there, and hopefully be able to implement at least half of the functionality of TMP using WebExtensions within the next two years.
Personally, I've installed add-ons for the bits of functionality that are possible with WebExtensions, and otherwise learned to deal with it. The performance and stability improvements are worth it.
Seems like we're getting closer with this version though. I might just have to be patient.
Looking forward to using FireGestures in Linux again.
The API docs all have browser compatibility tables.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Br...
The address bar suggestions used to be 2-lines and were so readable until someone just blindly copied the unreadable version of chrome.
#PopupAutoCompleteRichResult .ac-separator {
page-break-before: always;
width: 47px;
}
#PopupAutoCompleteRichResult .ac-separator-text {
display: none !important;
}
#PopupAutoCompleteRichResult richlistitem {
display: flex;
flex-wrap: wrap;
align-items: center;
height: auto;
padding-bottom: 5px;
}Found there were About three words laid out in the Column so I flipped My phone for a less Arduous reading Experience but there Was just more padding And I found the eye Tracking experience Exhausting so I stopped reading.
And the point of WebExtensions is to provide a stable API and prevent the constant breakage.