[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbutton/master] Bug 20375: Warn users after entering fullscreen mode.
commit f6b52b8d7f26277569211946248307996d12099c
Author: Arthur Edelstein <arthuredelstein@xxxxxxxxx>
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) {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits