Commit 1f443652 authored by Mike Perry's avatar Mike Perry
Browse files

Bug 13650: Clip window height to 1000px (configurable)

1000px was chosen based on the cutoff for vertical display users from the data
in: https://trac.torproject.org/projects/tor/ticket/13025#comment:17
parent dc2fae0f
......@@ -3452,16 +3452,20 @@ var torbutton_resizelistener =
try {
width = m_tb_prefs.getIntPref("extensions.torbutton.window.innerWidth");
} catch(e) {
if (maxWidth > 1000) {
width = 1000;
} else {
width = Math.floor(maxWidth/200.0)*200;
let cappedWidth = m_tb_prefs.getIntPref("extensions.torbutton.window.maxWidth");
if (maxWidth > cappedWidth) {
maxWidth = cappedWidth;
}
width = Math.floor(maxWidth/200.0)*200;
}
try {
height = m_tb_prefs.getIntPref("extensions.torbutton.window.innerHeight");
} catch(e) {
let cappedHeight = m_tb_prefs.getIntPref("extensions.torbutton.window.maxHeight");
if (maxHeight > cappedHeight) {
maxHeight = cappedHeight;
}
height = Math.floor(maxHeight/100.0)*100;
}
......
......@@ -227,3 +227,6 @@ pref("extensions.torbutton.confirm_newnym", true);
// Browser home page, and spell checker dictionary:
pref("browser.startup.homepage", "chrome://torbutton/locale/browser.properties");
pref("spellchecker.dictionary", "chrome://torbutton/locale/browser.properties");
pref("extensions.torbutton.window.maxHeight", 1000);
pref("extensions.torbutton.window.maxWidth", 1000);
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