gBrowser.tabContainer is undefined? Topic is solved

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
PseudoDistant
Moonbather
Moonbather
Posts: 73
Joined: 2024-02-06, 20:19

Re: gBrowser.tabContainer is undefined?

Unread post by PseudoDistant » 2024-03-05, 22:14

Kris_88 wrote:
2024-03-05, 21:56
Probably onStateChange, but I've never used that. This needs to be experimented...
https://udn.realityripple.com/docs/Arch ... _Listeners
This seems to work, I can't recreate the issues I was having before, I'll update if I have any new issues because of it.
Kris_88 wrote:
2024-03-05, 22:07
In general, the best documentation is the browser source code. And there is a certain set of methods and techniques for performing typical actions. There are a lot of subtleties and actually doing it right (that is, in the shortest and most reliable method, as browser developers would do) is not so easy...
I'll try to keep that in mind, thank you for the help. :angel:

One thing to note is that there is actually a delay before the icon actually changes...
It works, but only after I interact with the current page. There's still a bit more to go it seems. :think:
Eat your school.
Eat your drugs.
Eat your teeth.

User avatar
PseudoDistant
Moonbather
Moonbather
Posts: 73
Joined: 2024-02-06, 20:19

Re: gBrowser.tabContainer is undefined?

Unread post by PseudoDistant » 2024-03-05, 22:29

Never mind, I found an even better solution: Using my fucking brain.

I just split the onPageLoad method into two separate methods, so now the "onLocationChange" listener exclusively updates the icon.
I'm sorry, I'm normally better than this, I'm dealing with family issues at the moment.. :(
Eat your school.
Eat your drugs.
Eat your teeth.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: gBrowser.tabContainer is undefined?

Unread post by Kris_88 » 2024-03-05, 22:32

PseudoDistant wrote:
2024-03-05, 22:14
One thing to note is that there is actually a delay before the icon actually changes...
It works, but only after I interact with the current page. There's still a bit more to go it seems. :think:
I don't know which icon you are talking about, but maybe just for your information, there is an onLinkIconAvailable event in the same progresslistener. This refers to the site icon.

User avatar
PseudoDistant
Moonbather
Moonbather
Posts: 73
Joined: 2024-02-06, 20:19

Re: gBrowser.tabContainer is undefined?

Unread post by PseudoDistant » 2024-03-05, 22:54

Kris_88 wrote:
2024-03-05, 22:32
PseudoDistant wrote:
2024-03-05, 22:14
One thing to note is that there is actually a delay before the icon actually changes...
It works, but only after I interact with the current page. There's still a bit more to go it seems. :think:
I don't know which icon you are talking about, but maybe just for your information, there is an onLinkIconAvailable event in the same progresslistener. This refers to the site icon.
The extension icon, I change it depending on the site that's currently in view.
A Red icon is "supported"
A Grey icon is "unsupported"

I'm currently unsure if I want to distinguish between "fully supported" and "partially supported", but that's the gist of what I'm doing.
Eat your school.
Eat your drugs.
Eat your teeth.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: gBrowser.tabContainer is undefined?

Unread post by Kris_88 » 2024-03-06, 05:38

Take something simple and see how it's made inside.
https://addons.palemoon.org/addon/zoom-label/

User avatar
PseudoDistant
Moonbather
Moonbather
Posts: 73
Joined: 2024-02-06, 20:19

Re: gBrowser.tabContainer is undefined?

Unread post by PseudoDistant » 2024-03-06, 06:01

Kris_88 wrote:
2024-03-06, 05:38
Take something simple and see how it's made inside.
https://addons.palemoon.org/addon/zoom-label/
I resolved the issue by remembering how logic works.
PseudoDistant wrote:
2024-03-05, 22:29
Never mind, I found an even better solution: Using my fucking brain.

I just split the onPageLoad method into two separate methods, so now the "onLocationChange" listener exclusively updates the icon.
I'm sorry, I'm normally better than this, I'm dealing with family issues at the moment.. :(
I'm really just not in a good place right now, sorry for the trouble.
Eat your school.
Eat your drugs.
Eat your teeth.