Отображение вопросов с тегом: Показать все вопросы

userchrome.js: how to get notified when tabs open and close?

I've recently started using the Tree Style Tab extension, and I'm finding it useful, but I'd like it if the list of tabs could be automatically hidden when only one tab i… (читать ещё)

I've recently started using the Tree Style Tab extension, and I'm finding it useful, but I'd like it if the list of tabs could be automatically hidden when only one tab is open (and automatically shown when more than one tab is open).

I hoped to write an extension to do this, but opening the sidebar from an extension requires a user gesture, so I suspect I'll have to use a userchrome.js script.

From a "userchrome.js"-like environment (i.e. unsandboxed AutoConfig), I can hide and show the sidebar with `SidebarUI.hide()` and `SidebarUI.show("treestyletab_piro_sakura_ne_jp-sidebar-action")`, and I can examine the tabs open in the current window via `gBrowser.tabs`, but I can't see how to get notified when the number of tabs changes (replacing `gBrowser.tabs` with a proxy doesn't work, for example). I suppose I could just check every few seconds? That feels like a bit of a cop-out, though, and gets more and more inefficient the more windows are open.

There's an API for extensions to receive events when tabs open and close, so clearly this is possible. Where should I be looking for this functionality?

(I also don't know how I would go about unregistering an event listener (or cancelling a setInterval call!) when the window closes, assuming that's necessary to avoid leaking resources – is there an event like `chrome-document-global-created` I could listen for, but that fires during teardown of the window rather than when one is created?)

Задан ash 7 часов назад

history

How to PROPERLY erase history? I mean, you erase HISTORY...click...there you go...?!?!?...but, what's happening? I erased HISTORY...ah, I erased it FROM the panel but, it… (читать ещё)

How to PROPERLY erase history? I mean, you erase HISTORY...click...there you go...?!?!?...but, what's happening? I erased HISTORY...ah, I erased it FROM the panel but, it WILL remained on the list that it shows on top of the icon (sic) ...someone suggested to go on the panel, select privacy, scroll to history, pass over "Never remember history...." (?) AND then you "click"... Clear...what is the point? clear means clear means clear from EVERYWHERE...sorry about the mess I wrote but I was frustrated

Задан minutes2go 1 час назад

recaptcha

Today May 1, I noticed that any website that shows a recaptcha checkbox, including the google recaptcha demo (https://www.google.com/recaptcha/api2/demo) only shows an in… (читать ещё)

Today May 1, I noticed that any website that shows a recaptcha checkbox, including the google recaptcha demo (https://www.google.com/recaptcha/api2/demo) only shows an infinite spinner in firefox v125.0.3. I've tried the same sites in chrome and edge and the recaptcha works fine. In FF, I have cleared my cache, disabled tracking protection, disabled anti-virus and tried troubleshooting mode - still get the infinite spinner. Last week, I had no problems with recaptcha.

Задан bill340 54 минуты назад

Space bar not working.

Problem with using space bar when trying to post replies on YT or other sites. Can key text, but space bar does not work. On Google search page, can get only one space be… (читать ещё)

Problem with using space bar when trying to post replies on YT or other sites. Can key text, but space bar does not work. On Google search page, can get only one space between words. Tried 2 different keyboards w/same problem. Doesn't seem to happen on Chrome or Safari. Re-installed Firefox with same results. Any thoughts, please? Thank you.

Задан fullyladenswallow 7 минут назад