niklasgollenstede / unload-tabs Goto Github PK
View Code? Open in Web Editor NEWWebExtension that unloads tabs and prevents tabs from loading
Home Page: https://addons.mozilla.org/addon/unload-tabs/
License: Mozilla Public License 2.0
WebExtension that unloads tabs and prevents tabs from loading
Home Page: https://addons.mozilla.org/addon/unload-tabs/
License: Mozilla Public License 2.0
The tabs
permission is only needed to access a tab's url
, title
, and favIconUrl
. This information is available at the top of this article: tabs - Mozilla | MDN.
Is those properties really used by this extension? If not then you could remove the permission from your manifest without affecting the extension.
In Tab Tree "Unload Tab (X)" doesn’t unload tab, but create new tab.
In Firefox 61.0.1, with Tree Style Tabs 2.4.24, and UnloadTabs 0.8.1, the "Dim unloaded tabs" checkbox works as expected at first. But after exiting and restarting the browser it loses its effect until I go back into the extension preferences to uncheck the checkbox and check it again.
The Options tab for UnloadTabs in the Addon manager is completely blank. I've tried un- and reinstalling UnloadTabs but the options tab is still blank. The addon does work though, but I can't change any of the current values. The options weren't always missing. I've used the addon for quite a while with no issues. Any suggestions as to how I can get the options back?
Situation:
When using the URL-bars "Switch to Tab" feature from new tabs (never navigated), Firefox closes the tab and intentionally switches to a possibly unloaded tab.
UnloadTabs prevents that:
I wonder if [detecting about:newtab] will work with extensions that change the new tab
No it would not. That is one thing I had in mind when I wrote “There will certainly be some edge-cases to consider”. There would need to be a preference to adjust the new tab page (but it would probably be rather difficult for the user to get the correct URL).
“focus jump distance” might work as good metric
This does indeed seem like a better idea. It may not even need to be optional. The only other situation I know of where Firefox jumps to a non neighboring tab (on close), is when you just opened the closing tab, and in this situation it is rather unlikely that the previous tab is not loaded.
Thanks for your further input!
On 2018-05-10 04:54, miloss wrote:
Thanks for your reply and explanation. I completely forgot that firefox closes the blank tab used for search.
Yes, non-blank tab is not closed when I switch-to-tab. It feels wrong editing tab I want to keep, but works as good workaround.I wonder if this method will work with extensions that change the new tab, for example "new tab tools". For firefox it looks like blank tab, because it gets closed when I use "switch to tab", but I am not sure how it will appear to your extension.
Also, I don't think that exempting all blank tab closes will work well in my case, as I sometimes forget a blank tab around and later manually close it. Even though I, personally, prefer dealing with mis-loaded tab next to manually closed blank tab to losing comfortable "switch to tab", but I am afraid it is a bad idea to solve an easy to understand problem "broken switch to tab" by creating obscure problem "unloaded tabs sometimes load". Maybe, until better solution is found, make it a configuration option "Support for SwitchToTab (experimental)" that will document this tradeoff?
I am thinking... how complex is the current firefox "on blank tab close" behavior? Can you model it and block only tab switches that match? Alternatively, I think "focus jump distance" might work as good metric. I expect most users to only use "switch to tab" when they don't spot the target tab on the screen, e.g. only to reach tabs far away.
Have a nice day!
Niklas Gollenstede wrote:
Interesting. I wasn’t aware of this, because I have the “Switch to Tab”
thing disabled.It is not directly possible to detect when the feature is used, but as
far as I saw, Firefox only closes the current tab if it is a tab that
has not been used yet.
So a pretty close approximation would be to assume the future is used
when a |about:newtab| (the default URL of new tabs, even if it is not
displayed) tab closes.
There will certainly be some edge-cases to consider, but the basic
behavior could be to ignore the close event of tabs if their URL is
|about:newtab|.I just added a note in the source code so that I won’t forget it, but I
can’t tell you when I will find time to implement this. I’m rather busy
at the moment …On 2018-05-08 14:44, miloss wrote:
Thanks for this update, close last tab now works with a notification.
That is equally good to opening new blank tab like pre-webextension did.But I have missing feature to report.
Open new tab, type title of other open-unloaded tab, select one of "switch to tab" options in drop-down.
Can you tell this situation from other tab loading and allow it?Thanks.
Add localization capability.
Could you add the option to just unload selected tabs that were selected using the browser.tabs.multiselect ?
there are no preferences displayed and when i click unload tab on any one of the tabs i get a notification like this. does librewolf prevent the extension from loading because it's a hardened derivative of firefox or is the extension having some bugs?
OS: Arch Linux
Browser: Librewolf
willing to provide more information if needed
I want the context menu options in Tree Style Tab but I'd rather not have the tabs dimmed, as I already have CSS to tell unloaded tabs apart from loaded ones.
feature request
It should choose an unloaded one nearby instead.
Hi,
love the extension - the only thing that I miss is a confirmation before actually re-loading a tab (e.g. a button on an unloaded tab).
Would it be possible to implement such a feature?
Use case:
when I have few unloaded tabs with the same title but different url's (e.g. same domain, different sub-pages) and I want to re-load one specific tab among them,
then I don't know which tab is the one by tab's title - but I will know if I see the url.
So I go through these pages one-by-one to check their url's.
Right now, each page is automatically re-loaded whenever I click on it (whether I want it to re-load or not).
Ideally, I would be able to choose whether I want to reload it or not (and look further for the one specific tab I'd like to reload).
E.g. all unloaded tabs could show a content similar to:
"
This tab is unloaded by UnloadTabs extension.
The tab's url is: https://www.example-url.com/sub-page/even-more/detail.html .
Hit the reload button below to reload this tab.
[RELOAD]
"
I know this feature is "implementable" - I don't know how "feasible" it is to implement. :)
While I'm reluctant to point to another extension, there's only one that I found (for FF-Quantum) that has this feature: "Freeze, Tab Suspender". (But it doesn't provide any automated tab-unloading, so doesn't provide any value to how I use FF.)
https://bugzilla.mozilla.org/show_bug.cgi?id=1465558
Found this bug on UnloadTabs
Only 2 of 10 tabs restored properly (see "Steps to reproduce").
Related issues:
rNeomy/auto-tab-discard#24
temporarily fixed by the author: rNeomy/auto-tab-discard@7836ef1
Lej77/tab-unloader-for-tree-style-tab#4
temporarily fixed by the author
Hi,
I think findClosestNonPending
should only search tabs in the visibleTabs
list, and if no loaded tab is found, it should just return null. Then we can change this into
gBrowser.selectedTab = findClosestNonPending(tab.parentNode.children, tab) ||
gBrowser.addTab();
Because otherwise the browser will jump into a random tabgroup which is a bit confusing.
(UPDATED on June 8, 2020)
Please, vote on APIs/bug fixes needed by extensions performing tab discarding (UnloadTabs, Auto Tab Discard, Session Manager, Tab Session Manager, Session Sync, MySessions, Session Boss, Tab Mix Plus, Session Buddy), so they can be better:
https://bugzilla.mozilla.org/show_bug.cgi?id=1427928 !! (NEW: Jan 3, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1462813 ! (NEW: May 18, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1404594 (NEW: Apr 21, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1450382 ! (NEW: May 18, 2018) (not sure if fixed; please vote)
https://bugzilla.mozilla.org/show_bug.cgi?id=1450384 (NEW: May 18, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1466904 (NEW: Jun 5, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1475240 !! (NEW: Jun 12, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1473601 (NEW: Nov 26, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1472626 (NEW: Nov 26, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1478424 (NEW: Nov 26, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1511756 (NEW: Dec 5, 2018)
https://bugzilla.mozilla.org/show_bug.cgi?id=1528895 (NEW: Feb 20, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1498432 (NEW: Mar 11, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1522184 (NEW: Mar 11, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1624083 (NEW: Jun 8, 2020)
https://bugzilla.mozilla.org/show_bug.cgi?id=1529575 (NEW: Feb 25, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1505960 (NEW: May 27, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1586083 (NEW: Oct 5, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1611878 (NEW: Jun 8, 2020)
https://bugzilla.mozilla.org/show_bug.cgi?id=1613577 (NEW: Jun 8, 2020)
https://bugzilla.mozilla.org/show_bug.cgi?id=1615500 (NEW: Jun 8, 2020)
https://bugzilla.mozilla.org/show_bug.cgi?id=1414024 (NEW: Jun 8, 2020)
https://bugzilla.mozilla.org/show_bug.cgi?id=1587762 (NEW: Oct 5, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1586236 (NEW: Oct 5, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1553260 (NEW: May 21, 2019)
https://bugzilla.mozilla.org/show_bug.cgi?id=1320585 ! (NEW: May 27, 2019)
TO VOTE ON THESE APIs/BUGS, register on bugzilla.mozilla.org first. Then go to pages above and choose "Vote" in "Details" at the top of page. After choosing "Vote" button, next page will appear and you need to mark field next to "Vote for this bug" and then click onto "Change My Votes". Please, vote for the bugs, but do not comment on bugzilla.mozilla.org (unless you have specific information that will help to resolve the bug).
http://tabmixplus.org/forum/download/file.php?id=2049
http://tabmixplus.org/forum/download/file.php?id=2048
http://www.basis.com/kb-voting-bugzilla
You can also add your e-mail as CC (People/CC) to these bugs, so developers will see that you are interested in solving these bugs, and you will be informed by e-mail about the changes, including new session manager-related bugs linked to meta-bugs and other bugs in the future.
At the moment, when CTRL + Clicking multiple tabs and using an unload tabs function will only work on the tab that is focused (the one you're currently in), as opposed to your selected tabs. I think it would be pretty cool to have it work with selected tabs as well. For example, you can select which tabs you want as active, and then right click unload other, or select a bunch of active tabs and suspend them all together, less binary than 1 tab or all the other tabs, while still being able to keep the same context menus.
There's a shortcut for unloading the current tab, but didn't find any for unloading all other tabs. I think that would be useful.
I'd like to suggest adding options to unload all tabs to the left, to the right, and to mark tabs to not be unloaded
I had to replace
@-moz-document url(chrome://browser/content/browser.xul) {
with
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
Prior to FF Quantum I used the "suspend tree" option of the Suspend Tabs + Tree Style Tabs combo, is there any way similar action could be added?
Simply unloading all tabs in the selected container would be close enough for my uses.
Hello first I wanted to ask if this addon is on AMO and if there are plans to update it for firefox 57+
“Unload Tab” and “Unload Other Tabs” have no mnemonic. All the standard Firefox items do†, and I’d say that in general everything should. This makes batch unloading quite slow to accomplish.
U is taken by “Undo close tab”. I’m thinking L, in “Unload Tab”, or X, i.e. “Unload Tab (X)” (I think some platforms hide the “ (X)” part somehow? Like with “Inspect Element (Q)”?).
I’m not so fussed about Unload Other Tabs. You’ll only ever use it once at a time.
† OK, except for “Open in new non-e10s window” if you’re on Nightly.
Mozilla announced that starting in Firefox 57, Firefox will no longer support add-ons that are not WebExtensions.
Is it possible to convert Unload Tabs to be a WebExtension, so it can continue working in Firefox 57 and beyond?
B remains unloaded but retains the loading icon indefinitely, until manually selected and loaded.
Happens with the "Prevent Firefox from loading unloaded tabs" option enabled.
Tried to use versions from 0.7.2-b1 to 0.7.2 - still not working (no "Unload" items in the context menu).
There is an error in browser console:
SyntaxError {
fileName: "resource://gre/modules/commonjs/toolkit/loader.js -> resource://unload-tabs/main.js",
lineNumber: 107,
message: "missing : after property id",
stack: "@resource://unload-tabs/main.js:107:undefinedrun@resource://gre/modules/commonjs/sdk/addon/runner.js:147:19startup/</<@resource://gre/modules/commonjs/sdk/addon/runner.js:87:9Handler.prototype.process@resource://gre/modules/Promise-backend.js:933:23this.PromiseWalker.walkerLoop@resource://gre/modules/Promise-backend.js:812:7this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise-backend.js:746:1"
}
Although 0.7.1 seems to be working fine in FF ESR 45.
Probably not a hard fix. Manually right clicking a pin and unloading it works. I guess they are kept in a separate list
they should be https://addons.mozilla.org/de/firefox/addon/unload-tabs/, but you’re missing the dash
I do not expect this to change Firefox’s behaviour. If the next tab that would be loaded is pending, so be it. I don’t want this extension to interfere.
Still, the behaviour I’m observing is I think not even the behaviour you intended.
I have lots of tabs. Here’s an extract:
When tab 6 is focused and I close it with Ctrl+W, I expect tab 7 to be focused, as it is in stock Firefox.
Instead, tab 4 is focused (!). Or in other similar circumstances, tab 5 (the previous tab).
I just want normal Firefox behaviour. I just want the TabClose event listener to be removed. Can changing the behaviour please be shifted to an option (and probably fixed so it matches what Firefox does more closely)?
I believe this extension should be focused only on unloading tabs.
It would be nice to have toolbar buttons.
By the way - thanks a lot for making this add on. Super helpful!
If I unload all the tabs, it's a bit disruptive for the page to not unload. Have to press Ctrl+T, go back to tab, and then Unload it.
It would be a much smoother interaction if there was an option for the extension to open a blank New Tab, if every tab is unloaded.
Bug 1450382 (loading discarded/pending tabs removes the favicon) was marked as solved (RESOLVED WORKSFORME). Can you confirm that described problem disappeared?
Once in a while I find I can no longer unload tabs. Usually in these cases I go to about:addons and try to open the preferences page for unload-tabs. I get a page titled "Invalid context" with this text:
500 Fatal Error
This extension page can't be displayed in private windows, container tabs or other non-normal contexts.
Please try to open moz-extension://11a02ba0-9893-4795-9a93-437361cc5314/UnloadTabs?originalTab=220#options in a normal tab.
But this is a normal tab, not a container. I try to open that URL in another regular tab and get the same error.
If I disable and then re-enable the addon it starts working again: I can unload tabs again and I can get to the preferences page.
Under unknown conditions, a MangaDex tab won't be properly unloaded, and attempting to use ANY tab as normal after will cause the content to flesh a dull gray with a low frequency that gradually goes up until no tab of the same window can be accessed properly, displaying the Firefox default "loading content" circle as if the tab froze.
Hi, just wanted to mention it would be nice to have a third menu option that unloads tabs in all windows rather than only the current window. This would be useful when there are 10+ windows open on multiple desktops, and the Firefox memory usage is high.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.