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

Simple Switching

  • 3 Devlogs
  • 7 Total hours

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

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 38s 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
2
Open comments for this post

47m 35s 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…