ericchase / addon--maximize-all-windows

A Firefox addon for maximizing all browser windows.
Apache License 2.0
6 stars 2 forks source link

[Enhancement] Override ResistFingerPrinting #4

Closed e-t-l closed 3 years ago

e-t-l commented 3 years ago

This extension doesn't work if privacy.resistFingerprinting: true in About:Config. RFP is a whole suite of anti-fingerprinting settings, so I'd rather not disable it completely. Is there any way to update this addon to override the window-size-setting of Firefox's RFP pref?

ericchase commented 3 years ago

2021-06-06_21 24 21

https://user-images.githubusercontent.com/30473157/120951126-c21b3f80-c70d-11eb-86e9-65f389de14d2.mp4

Seems to work. Can you please confirm your issue?

e-t-l commented 3 years ago

Hm yeah that's definitely not the behavior I get. I tried installing your extension, made sure the settings were all checked, and quit Firefox then reopened it. Firefox opened in the standard size window and did not maximize.

Are there any other settings or prefs that could interfere with this that you're aware of?

ericchase commented 3 years ago

Not that I'm aware of, no. I do notice that the maximizing process is slightly different than what I'm used to when the fingerprinting is enabled. I'm not especially skilled with browser stuff, but I do agree that something could be interfering.

e-t-l commented 3 years ago

Don't know what changed, but this extension is now working. It does sometimes have a couple-second delay, so that's probably either 1) the age of my computer, or 2) the loading order of the extensions installed. Either way, no need to fix anything.

Mati20187 commented 2 years ago

I use Librewolf, a fork of Firefox, on Arch Linux and also have this problem. When I set privacy.resistFingerprinting: to false the add-on works correctly but, as @e-t-l said, I'd rather not disable it. Is there a specific entry I can disable to make it work or any other workaround? I've tried privacy.resistFingerprinting.block_mozAddonManager:false but it doesn't change anything. Here are my settings that may be relevant: librewolf

ericchase commented 2 years ago

Setting privacy.resistFingerprinting to true does not seem to affect the extension on a clean Firefox installation in Windows 10. This leaves two possibilities that I can think of. 1 being that the Linux version of Firefox works differently, and 2 being another extension or other setting is interfering with the maximizing process.

ericchase commented 2 years ago

I find the 2nd possibility here to be highly likely, as I've been able to break extensions multiple times before with little explanation. A clean installation usually solved the issues. Tracking down the actual cause is a lengthy process that I don't consider worth the time or effort. Wiping out the program files and folders and reinstalling Firefox+extensions is a much faster process if you save all your bookmarks and extension settings beforehand. Without setting up a Linux system of my own, I can't really provide much help with this problem.

Mati20187 commented 2 years ago

@ericchase Would you be able to check if your addon works with Librewolf's Windows version? That could rule out Linux's fault. Unfortunately, I don't have a windows machine handy and thus can't do it myself. https://librewolf.net/installation/windows/

ericchase commented 2 years ago

Yeah I can take a look at it

ericchase commented 2 years ago

@Mati20187 Ok, the only thing that doesn't work is the minimizing windows that were minimized before, because resist fingerprinting resizes each window to a specific predetermined size. After that, however, the window should be maximized as expected. The addon doesn't keep track of window states each session, it simply takes advantage of how the browser tracks window state.

ericchase commented 2 years ago

https://user-images.githubusercontent.com/30473157/147419063-352b4aad-0b62-4553-b59e-fc5de1b738f6.mp4

Mati20187 commented 2 years ago

@ericchase I think I've figured out what causes this. I have Librewolf's history set to "Never remember history" which is basically constant private (incognito) mode. I have the add-on set to enabled in private window. When I enabled history, the window got maximized. Try these settings and we'll see what happens.

ericchase commented 2 years ago

Yeah, without history, the previous session will be cleared. The single browser window that opens should still be maximized though.

Mati20187 commented 2 years ago

@ericchase Unfortunately, that's not the case. Even the first window that opens when starting the browser doesn't get maximized. Is it the same on the Windows version of Librewolf?

ericchase commented 2 years ago

Is it the same on the Windows version of Librewolf?

It worked as expected for the first window.

Mati20187 commented 2 years ago

Very strange. I'll try asking on Librewolf's Matrix server. I guess it must be an issue specific to the Linux version of the browser.

ericchase commented 2 years ago

Holy Christ, installing LibreWolf on Ubuntu was a pain in the ass. Why would you use this browser?

Anyways, extension works as expected:

https://user-images.githubusercontent.com/30473157/147712227-9ec95306-d284-4bfc-b70d-d0df535e0339.mp4

Mati20187 commented 2 years ago

I've talked with the main dev of Librewolf and we managed to figure out what's wrong. Your addon doesn't seem to work in private windows and I had Librewolf set to "Never remember history" which is constant private mode. Now I have history set to "Custom" and have "Clean history when Librewolf closes" checked and the extension works fine. Can you verify that the extension doesn't work when history is set to "Never remember history" (actually, when choosing this option and restarting the browser, it often shows up as "custom" with the "always use private mode" option selected, so you can try that as well)? As for why I use it, it's basically the same as Firefox but with extra anti-tracking features, hardened config, and Firefox's antifeatures like Pocket disabled. And yeah, installing most packages on Debian-based or non-Arch-based distributions is a pain: snaps, flatpaks and a bunch of other bullshit. That's why I use Arch. Arch User Repository has everything.

ericchase commented 2 years ago

Ok, fair enough. I don't see how the extension would work in private windows, considering they don't have history, nor do they reappear on browser restart. I figured that would have been a given.

ericchase commented 2 years ago

I imagine you guys have worked out the issues, but I felt I should just give a tip on bug hunting. You did a lot of guessing from start to resolution. Guesswork usually doesn't pay off with debugging, from my experience. I would suggest as an alternative that you start off by expressing what you want or need, rather than what you expect should happen. In this case, I'm left thinking that what you wanted is an extension to maximize windows for private browsing. Incognito windows, by default and their purpose, do not keep track of history. Therefore, they would not be saved in with your session data. Which means, they would not reappear the next time you open the browser. So this extension has no effect on those windows.

If you stated that you are looking for a way for the browser to remember the windows that were open during your last session, whether they are normal or incognito windows, then I would start questioning you on why you use incognito windows, because that train of thought goes against the goal of those windows. Then, we could approach the problem from a different perspective. Making an extension that remembers the history for you instead of using the browser history, would probably not take much more work.