Simple Switching
- 6 Devlogs
- 27 Total hours
A browser extension for switching through tabs in MRU (most recently used) order
A browser extension for switching through tabs in MRU (most recently used) order
Before pushing any major update I tend to test all the things myself to ensure that user-facing compatibility is pristine. However, when I went on and tried engaging one of the main features of my installer - parallel installs, I began to face a problem - the extension wasn’t installing!
My guess is that Google family of browsers (Chromium, Chrome and Chrome Canary) have some protection or sandboxing, and trying to initiate an install across multiple browsers is disallowed deep inside Chrome’s code.
Another possibility is that my code is broken or the server that runs locally to install the extension isn’t configured properly. This is probably more likely, as I could’ve overlooked things.
Either way, the easiest fix for that was to disallow concurrent installs and only let users select one browser at a time to install the extension for. This works surprisingly consistently, as I wasn’t able to encounter any issues.
Thanks for anyone who keeps an eye on this project. It was more of a pain than actually something useful, but I don’t regret my efforts.
Stay creative, stay open source!
While testing how builds worked and preparing this project for a release, I came to the realization that if I’m promising a cross-platform product, I should test it on all platforms first. I’m a Linux person, so when it all worked on my local machine, I didn’t bother much.
Turns out - that was a huge mistake! Chrome-based browsers on Windows and macOS tend to block custom policy installed extensions due to security reasons. For that to work, a machine must be enrolled to a real management framework - Active Directory or similar. Linux is excluded due to no standard tool existing and the fact that not everyone using a Linux machine might have root access.
First of all, I panicked, as any normal human being would. My first thought was to ensure a manual installation flow on Windows/macOS by letting users install the extension through development mode. However, the thing that disallowed me from implementing such approach was incompatibility between browser Preferences file schemas (at least when I went to check, it seemed this way). Not knowing how to ensure a working build quickly, my solution was to only support Linux systems.
Yes! If your browser is built on Chromium (the architecture that powers Chrome, Brave and more), you can, and there are still instructions on how to get the builds working on all platforms for the extension itself. However, you should be aware of such things:
BrowserInstall/Profile/Preferences file after installation (replace BrowserInstall with your browser’s data directory and Profile with your profile name (Default by default)).Not really. I set up this project for shipping with custom branding and subtle tweaks within extension code, as well as a fully working provisioning framework for Linux users, and I’ll go create something new now!
This was never intended to be production-ready, but instead serve as a tool for making Chrome more usable than it currently is.
Even if you see a struggle, try to do everything in your will to overcome it, even if it means cutting corners is necessary!
After quite some time of research and rest from constant development, I finally found out how the extension should be installed, removed, and provisioned for human usage.
The installer is still in very early stages of development, and I believe that some bugs still exist, despite my best efforts of testing various scenarios of installation (for now, it’s still fully proven to be working on Linux, with no guarantee of Windows or macOS functionality). So let me tell you what I achieved.
This installer fully works offline, provided you have a built and signed extension ready.
Chromium-based browsers (like Chrome, Edge, Brave and more) expect the extensions to be installed through one of these ways:
I chose the second option. It’s the only one that reliably lets me achieve one thing - locally hosted extension installation.
Well, Chromium-based browsers expect an update.xml file hosted through http, alongside the extension.crx file, which is signed using some private RSA key. I wanted local hosting for security reasons (so the user has more control of what happens on their pc rather than downloading something from the internet (more on that later)). Only way I can get true local installation is through those policies, as limitations apply using other methods.
First of all, after user chooses desired browser profiles, it closes selected browsers, if any are open, hosts the installation server, deploys the policies, opens the browsers up briefly (installation can’t be performed in a closed browser), closes them again and provisions the shortcut (as one of this project’s goals was to integrate natively with Chromium’s Ctrl+Tab shortcut for switching tabs). After all that, all selected compatible browsers should have the extension installed. Uninstalling simply makes sure to remove any provisioned files (extension itself and the policies).
Well, the extension will still need some sort of way getting on your PC, so I’m thinking about these 2 methods:
Also, I need to think about how the extension should be updated, but that’s for the future.
Thanks for reading, I’ll update you with the newest updates soon!
I feel like every project I make I face a similar set of limitations. So, let’s make a recap of the first stage of this project!
As usual, I’m facing API issues. I enjoy making app extensions less and less due to restrictive rules they enforce. To make it clear, initially I had a specific set of plans at which my extension would excel compared to others:
However, only one of those I was able to accomplish, with another one planned for the second stage of this project:
Spending a lot of time, I at least made sure the extension functions well, with no memory termination and with each window having its own tab access history.
Well at first, Manifest V3 greatly reduced the amount of stuff that can be accessed by Chrome’s API. On top of that, chrome:// pages can’t be anyhow monitored or modified due to essential safety. This posed many issues, one of which was the inability to detect the press of a modifier key, so I had to go one of two ways:
I chose the second option.
I spent a whole day trying to save and load tab history, but the problem is that Chrome:
And, any tab indication falls short because Chrome doesn’t have any API to reliably highlight tabs without selecting them.
Next thing I will most likely do is make the provisioning system that overrides Ctrl+Tab shortcut and installs the extension automatically.
The extension itself is memory safe and very useful as is. I don’t plan to update it anyhow besides changing the current branding.
Due to Chrome’s very restrictive API, there are things that will not be implemented as promised. Things such as:
Having said the limitations of Chrome’s API, I was able to fulfill these things:
Before I start coding the Python applet that would provision this extension, I want to also solve these problems:
I’m sick of not being able to switch recent tabs in most of Chrome-based browsers! And the problem with the existing extensions is that they don’t memorize more than 5 tabs, and use a timing-based system, which requires very fast shortcut tapping. I’m on a mission to change this.
On top of my goals of making an unlimited tab queue and fix the timing issues, the extension will be 100% free and open source, also I don’t plan to release it on any extension store, because I have a different install method in mind.
I want to make a beautiful Python CLI or GUI wrapper that installs and provisions the extension. Things like:
Will all be shown and handled by the installation app
Stay tuned! If I succeed it will be a very nice extension for everyone and every machine!