Your comments

I restarted, and I can confirm it's working with 2365 tabs open. Congratulations! And thanks for making life easier!

I'll post another message with a tip, because I feel like being helpful :)

First of all, thanks a lot for tackling this issue! I won't be able to see if it works before I quit Opera because, well, I'm working & all, but I really thought development was left aside(wise), and given the number of issues opened, it's great to know the only important one for tab hoarders has been addressed ;-)))))

Also, thanks a lot for publishing a non-uglified version. I don't know if it wasn't by mistake, but your source code for this version has all of the variable names intact, which should make it easier for everyone to debug as needed. (Plus, uglification is needed for websites to make them load a bit faster, but extensions are cached so it shouldn't be a concern...)

I see that you've made a lot of changes, not just to the way you're using the storage object instead of HTML5 local storage. I wasn't even aware there was an 'async' keyword for function declarations. ;)


If anyone finds this post while looking for a solution to the storage size, I've got a quick fix for you.

Symptom: you opened a ton of tabs (let's say over 2000 but it can be less or more, depends on what's in the session list), then you quit Chrome (or had it crash), relaunched it, and Sidewise no longer loads your tabs.

Solution: go to your browser's extension folder.

More precisely, in my case with Opera (I'll let you look for the equivalent Chrome folder):

C:\Users\**Your user name**\AppData\Roaming\Opera Software\Opera Stable\Extensions\biiammgklaefagjclmnlialkmaemifgo\2016.5.5.0_0\js\bg\

Open the file 'background.js', and find this:


Replace with:


(That's just two single quotes.)

Now just disable Sidewise and re-enable it (or restart your browser).

What does this do..? Sidewise has 3 copies of your complete tab session: pageTree (current one), backupPageTree (latest "safe" tab tree), and backupPageTreeLastSession (last working tree before Sidewise got initialized, i.e. usually before you launched Chrome or Opera). Since the maximum storage space is 5MB, having a session at around 1.6 or 1.7MB in size will fill the maximum space allowed, and the line I gave you above will quite simply crash your extension. Replacing it with an empty string ('') will reduce your storage use by 1.7MB, thus allowing you to go up to 2.3MB or something in size-- should be more than enough to take time to close as many tabs as you can. After that, quit your browser, and if you want to restore the last session feature, just restore the background.js file to what it used to be.

Please note, my first attempt was to convert the localStorage stuff to, I first wasted hours trying to add the unlimitedStorage permission (turns out I needed to package a new extension otherwise it just ignored my manifest changes), then after that I realized the whole asynchronous thing, which makes it hard to just mindlessly convert the code (although it has to be said, localStorage isn't used MUCH... Only in the line above, and in settings.js. Maybe I'll get back to it in the future. I can always write a synchronous function that simply waits for a flag to be set by the asynchronous one. I was just too tired for it.)