Commit f6b52b8d authored by Arthur Edelstein's avatar Arthur Edelstein Committed by Georg Koppen
Browse files

Bug 20375: Warn users after entering fullscreen mode.

When the browser window is maximized, we show users a notification
warning that maximizing the screen is fingerprintable. We should
show this warning when the window enters fullscreen mode as well.
This change is especially important for macOS, which uses
window.STATE_FULLSCREEN instead of window.STATE_MAXIMIZED when
the user clicks the "maximize" button on the window title bar.
parent 97380447
......@@ -2126,7 +2126,8 @@ var torbutton_resizelistener =
m_tb_resize_handler = async function() {
// Wait for end of execution queue to ensure we have correct windowState.
await new Promise(resolve => setTimeout(resolve, 0));
if (window.windowState === 1) {
if (window.windowState === window.STATE_MAXIMIZED ||
window.windowState === window.STATE_FULLSCREEN) {
if (m_tb_prefs.
getIntPref("extensions.torbutton.maximize_warnings_remaining") > 0) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment