Skip to content
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

Page reload after private tab toggling #245

Open
ghost opened this issue Feb 4, 2017 · 4 comments
Open

Page reload after private tab toggling #245

ghost opened this issue Feb 4, 2017 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Feb 4, 2017

No description provided.

@Infocatcher
Copy link
Owner

See #237.
Toggling private state of already opened tab isn't possible at all in Firefox 52+ (https://bugzilla.mozilla.org/show_bug.cgi?id=1318388#c28) and may cause crash in Firefox 51+, so in Firefox 51+ now used trick with tab duplication (to change private state of new duplicated tab and close initial one).
So, extensions.privateTab.toggleTabPrivateAutoReload doesn't work in Firefox 51+,

@ghost
Copy link
Author

ghost commented Feb 4, 2017

I had deleted my comment because a mistake made me lose the page ...

Private Tab v.0.2.1.2 (2017-01-27) / Firefox 51.0.1 64-BIT / Win7 64-BIT

What I had in mind was this:
In a previous thread here you had told me that I could use the Custom Buttons extension to make a toggle button ... #235

For Custom Buttons extension (for "code" section in the button editor):
privateTab.toggleTabPrivate(gBrowser.selectedTab);
Or just like checkbox in tab context menu:
document.getElementById("privateTab-tabContext-toggleTabPrivate").doCommand();

If I make that button with first code PT toggles without page reload, if I use the second code, page reloads when PT toggling (same as tab menu item).

I've tried to switch extensions.privateTab.toggleTabPrivateAutoReload to false, but page always reloads.

Page reload can be bothering when a site reinitiates the query when page reloaded, i.e searX search engine. if I toggle from tab menu, or ctrl-alt+T or Custom Button with script 2 then searX sends me to the home page. If I toggle with Custom Button fit with privateTab.toggleTabPrivate(gBrowser.selectedTab); then the toggle does not reload the page ... that's all I wanted to express.

Reading your comment leads me to believe I'd better opt for code2 in the Custom Buttons extension ...

Thanks.

@ghost
Copy link
Author

ghost commented Feb 5, 2017

I forgot to mention the exact context where I manage to toggle a page without that page being reloaded:

At this time toggling Private Tab with this button works correctly without the page being reloaded.

As I understand it this scheme wouldn't be valid starting Firefox 52 ...
And it's not the only headache Mozilla's big heads are spreading.
2017 bound to be then an Apocalypse Now for developers and power users.

@Infocatcher
Copy link
Owner

Before Private Tab 0.2.1 and Firefox 51 "Private Tab" checkbox in tab context menu have used privateTab.toggleTabPrivate() (his internal equivalent) with additional logic to reload tab after switching (better in most cases... to instantly show private state of page). And with preferences to modify behavior: extensions.privateTab.toggleTabPrivateAutoReload (reload or not), extensions.privateTab.toggleTabPrivateAutoReload.stopLoading (stop page loading before change of private state).

In Firefox 52+ to prevent possible crashes (and yes, this is strange practice) was forbidden (from Firefox side) calls like privateTab.toggleTabPrivate(gBrowser.selectedTab) for already loaded tabs.
And crashes may happens in Firefox 51+, so in Private Tab 0.2.1+ used workaround to toggle private state: open new tab (duplicate) in private mode and then close initial tab.
So, privateTab.toggleTabPrivate() will not work in Firefox 52+ for already loaded tabs... Will work only second code with tab duplication trick inside.

And it's not the only headache Mozilla's big heads are spreading.
2017 bound to be then an Apocalypse Now for developers and power users.

Yes. :( Everything should be rewritten from scratch. And only if will be implemented API from Firefox side.

@d5xtgr
Copy link

d5xtgr commented Feb 7, 2017

This is a privacy lapse to my mind- if I toggle privacy off, I'm expecting any pages I visit moving forward to appear in my history. But now the current page will be added to history also, which is contrary to the previous behaviour (and no warning was given about the change). So this use case is no longer possible: I want to open a link which must be clicked on a given page (referrer header is checked) but I don't want the referring page saved to history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants