You are browsing as a guest. Sign up (or log in) to start making projects!

Simple Switching

  • 6 Devlogs
  • 27 Total hours

A browser extension for switching through tabs in MRU (most recently used) order

Ship #1 ✨ Blessed

Simple Switching as probably every Chrome user’s dream!
Have you ever tried scrolling through latest tabs using Ctrl+Tab? That’s right, you can’t! After all these years Google refuses to implement it, leaving community developing workarounds.

This extension isn’t much special or different by itself. All it does is allows switching through latest tabs on a shortcut press. The special thing is a LINUX-ONLY software that installs this extension.

Why is it so special? Because it not only installs software, but also provisions an override for Chrome’s default Ctrl+Tab shortcut, something that was almost impossible with other providers without manual fiddling.

While the installer supports Chrome, Chrome Canary, Chromium, Brave and Vivaldi IN THEORY (has configs for those browsers), only Google family has been tested on Fedora, other distros and browsers MAY fail, though should not. The installer also lets users uninstall the extension leaving minimal traces of Simple Switching!

I really hope someone finds this project useful. And if not, it still was a fun time developing!

  • 6 devlogs
  • 27h
  • 7.89x multiplier
  • 258 Stardust
Try project → See source code →
Open comments for this post

1h 1m 14s logged

Last devlog before shipping!

Final changes

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!

0
0
7
Open comments for this post

10h 15m 58s logged

Linux it is…

How this project turned out to be Linux-only

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.

What did I do to resolve this?

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.

Can I still install the extension on my non-Linux machine?

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:

  1. You will get the default Alt+Q shortcut provisioned instead of Ctrl+Tab override (unless you decided to edit the BrowserInstall/Profile/Preferences file after installation (replace BrowserInstall with your browser’s data directory and Profile with your profile name (Default by default)).
  2. You are taking management into your own hands without any official support from me.

Are there more updates planned?

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!

0
0
3
Open comments for this post

9h 20m 38s logged

Suit up!

A graphical way of installation was just implemented!

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.

The offline installation framework

This installer fully works offline, provided you have a built and signed extension ready.

About its inner mechanisms

Chromium-based browsers (like Chrome, Edge, Brave and more) expect the extensions to be installed through one of these ways:

  1. An extension store, provided in browser’s configs (for Chrome the default is Chrome Web Store, other browsers often implement their own)
  2. Enterprise policies with force-install capabilities
  3. Through default startup install list

I chose the second option. It’s the only one that reliably lets me achieve one thing - locally hosted extension installation.

Why policies?

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.

How the installer’s lifetime goes

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).

What limitations it has?

  1. Enterprise policies prevent the user disabling or uninstalling the extension through browser’s UI tools. It’s treated as “managed by organization”
  2. A “Managed by organization” label appears. It does not limit the functionality of the browser, but can be irritating
  3. If you don’t trust this software and the things it does (system file and registry changes, root access requirements and more) can feel a bit unsafe. On the other hand, the source is open and can be inspected by anyone at any time, altered or forked to fit your needs!

Next steps?

Well, the extension will still need some sort of way getting on your PC, so I’m thinking about these 2 methods:

  1. Making installer download it from the latest GitHub release
  2. Adding a –local-path= flag for custom, local builds and providing a script for auto-packaging the extension yourself

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!

0
0
10
Open comments for this post

3h 56m 21s logged

Storytime!

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!

Very lucky unlucky day

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:

  • No timeout logic, instead handling tab switching based on specific key inputs (this will be important later)
  • Save/load tab history from storage for access after restoring tabs
  • Unlimited tab history
  • Indication of the tab that will be switched
  • Ctrl+Tab override

However, only one of those I was able to accomplish, with another one planned for the second stage of this project:

  • Unlimited tab history
  • Ctrl+Tab (planned for later)

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.

Why other things failed?

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:

  1. Build an OS-level keylogger which communicates with the extension through an open bridge, but I turned it down because:
    • It’s a threat to security
    • Python on the host computer is required (in order for me to retain a single codebase for each platform)
  2. Or just resort back to carefully adjusted keypress timeouts

I chose the second option.
I spent a whole day trying to save and load tab history, but the problem is that Chrome:

  1. Doesn’t expose any method to etch the data to a saved session
  2. Figuring out when history should be loaded, when saved to disk, and how to conect fast RAM with slow disk I/O is a true pain due to asynchronous nature Chrome is built on

And, any tab indication falls short because Chrome doesn’t have any API to reliably highlight tabs without selecting them.

Next steps?

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.

0
0
4
Open comments for this post

2h 6m 41s logged

The bitter truth

What I wasn’t able to accomplish

Due to Chrome’s very restrictive API, there are things that will not be implemented as promised. Things such as:

  • Holding modifier key freezing the queue (instead, I resorted to using timeouts)
  • Indication of what will be the tab switched

Not all hope is lost!

Having said the limitations of Chrome’s API, I was able to fulfill these things:

  • Unlimited tab queue (or at least enough for any normal usage, I haven’t pushed the extension to the limits of RAM usage)
  • Intuitive usage (timeout seems appropriate, and the extension works)
  • Clean and modern development flow

What’s left to implement before moving to provisioning?

Before I start coding the Python applet that would provision this extension, I want to also solve these problems:

  • Implement restoring tab order upon closing and reopening the browser
  • Adding any newly added tab to the top of the queue
  • Fiddle around with timings to find what’s the best for intuitive usage that doesn’t get in the way
0
0
3
Open comments for this post

48m 21s logged

A new project begins!

What’s it about?

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.

How will this extension differ from others?

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.

How will I install it then?

I want to make a beautiful Python CLI or GUI wrapper that installs and provisions the extension. Things like:

  1. Ctrl+Tab shortcut setup
  2. Installation
  3. Information on what will be changed inside the system

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!

0
0
4

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…