Coder Social home page Coder Social logo

Comments (16)

captnfab avatar captnfab commented on July 28, 2024 2

@eceprof hehe, thanks!
The addons.mozilla.org version has been approved. Please tell me if it works well for you :)

from firetitle.

captnfab avatar captnfab commented on July 28, 2024 1

Yes. Windows naming on restore is broken. Any help is welcome.

from firetitle.

eceprof avatar eceprof commented on July 28, 2024 1

Captnfab, you are fabulous. I just "upgraded" to Firefox Quantum and to my dismay lost the ability to use FireTitle, felt saved by Crappy FireTitle and then discovered the session restore problem!!! Imagine my relief when I opened this page and discovered at the end of it that you have found a solution the very day I looked for one. Thank you so much for being a lifesaver. FireTitle is second only to session restore to being my most needed and loved FireFox extension/capability.

from firetitle.

captnfab avatar captnfab commented on July 28, 2024

Thanks for your report, I'll investigate.

from firetitle.

captnfab avatar captnfab commented on July 28, 2024

Ok, I found the cause of the problem. When a session is restored, the windows are restored but their Id may change.
So, storing window's names / title patterns using window's id can't work.
Apparently, window.sessionId is the way to go, but those look empty…

from firetitle.

rsalmei avatar rsalmei commented on July 28, 2024

Hey! Thanks for the response in the mozilla review.
Just came here to vote for the issue. It should have a way to accomplish this... Good luck!

from firetitle.

Betlista avatar Betlista commented on July 28, 2024

FF 57.0 forced me to switch from FireTitle to Crappy and after FF restart (I have option "Show your windows and tabs from last time") all titles (except one) are gone :-(

from firetitle.

Betlista avatar Betlista commented on July 28, 2024

@captnfab Can you point me directly to part, in which it is storing/loading titles?

from firetitle.

captnfab avatar captnfab commented on July 28, 2024

Sure. The problem is actually pretty simple.

Loadding occurs here:

cur_win_name = result["win"+tab.windowId+"_name"] || result.def_win_name || default_options["win_name"];
window's Pattern/name are saved in the local storage as win+windowId+_name/pattern. Saving part occurs here:
browser.storage.local.set(prop_set);

Unfortunately, window's ids change upon restore. This means storing parameters that way can't work.
When I tried, the window.sessionId was a blank field, so it was unreliable too.

Hence, the problem is I don't know how to keep track of a window through session restoration…

from firetitle.

captnfab avatar captnfab commented on July 28, 2024

I think that the local storage is the wrong way to go.
Using sessions seems a much clearer approach: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/sessions

from firetitle.

captnfab avatar captnfab commented on July 28, 2024

Let me try to do something...

from firetitle.

Betlista avatar Betlista commented on July 28, 2024

I do not see the problem with local storage... The problem is a unique identifier. I see few candidates in https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/Tab id or sessionId, can you try tab.sessionId instead of window.sessionId ? I know that you are doing it on window level, maybe you can do something like save id/sessionId of a first tab in every window...

from firetitle.

captnfab avatar captnfab commented on July 28, 2024

I've got it working. I'm doing some cleaning since I'm not really proud of the state of the code.
I'm also polishing the UI.
I'll try to push the new version today and upload it to mozilla addons website for review.

from firetitle.

captnfab avatar captnfab commented on July 28, 2024

I've uploaded the new version to addons.mozilla.org and it is now pending review.

from firetitle.

Betlista avatar Betlista commented on July 28, 2024

I'm also going to test immediately ;-)

from firetitle.

Betlista avatar Betlista commented on July 28, 2024

Tested with 24 windows and 236 tabs and worked as expected, thanks for fix!

from firetitle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.