[tor-commits] [torbutton/master] Bug 20375: Warn users after entering fullscreen mode.
gk at torproject.org
gk at torproject.org
Wed Aug 23 14:07:08 UTC 2017
commit f6b52b8d7f26277569211946248307996d12099c
Author: Arthur Edelstein <arthuredelstein at gmail.com>
Date: Tue Aug 22 12:06:21 2017 -0700
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.
---
src/chrome/content/torbutton.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 11f4b61..db6b694 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -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) {
More information about the tor-commits
mailing list