-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New action for Back or close #69
Comments
I have to admit, that this would be an useful option for the backwards action, but the webextension API currently does not provide a proper way to get the history of a single tab. I would have to inject a little peace of code in the tab itself which checks, if there are any further entries in the history and then (in the case of no further entries) sends a message to my addon which indicates, that the tab should be closed (because a tab can not close itself). Because of this complications I won't implement it, but I'm looking forward to a better history API by mozilla. For more information: |
Thank you for the explanation. I voted for both Mozilla bugs. I guess Firefox will remain a noticeable bit less comfortable for a long while now. |
Is this possible now? And could I write a custom script as gesture action to do it? |
Sorry, but this is still not possible. I plan to add some API to user scripts so you can close tabs via a user script. However even then the solution for your problem would still be a little bit hacky, since there is no proper history API provided by Firefox. |
The best workaround I found so far is the following user script:
|
After more than 2 years there is still no hope for the Firefox API that is required to properly solve this issue. Since the workaround kind of works, I consider this issue as solved. |
haven't tested it but looks like this api has the required functionality |
No, this API can only retrieve the browser history and not the history of individual tabs. |
That workaround does nothing here. Neither will it go back, nor will it close anything. But I see this error in the page's console:
|
Great, I already came to that Firefox bug through a limitation of FireMonkey (and already noticed your name there). Doesn't look like Firefox is doing much for extensibility. I'm wondering what all those new versions every couple weeks are for. |
i have implemented the functionality required to make this possible, but the patch is stuck with no one to review it. |
This has the limitation that intra-page back navigations will prematurely close the tab, even though the back navigation was executed and there would be more backwards history available. So unfortunately it's not suitable for production. |
I'm using a custom action in FireGestures to go back but if it's the first page in history, then close the tab. Here's the custom JavaScript, in case it will be any useful in Firefox 57 (still on Firefox 56, evaluating replacements for November).
Could this action be added to the addon?
The text was updated successfully, but these errors were encountered: