[or-cvs] r15080: We should provide a pref to not store Non-Tor pages in the s (in torbutton/trunk/src: chrome/content chrome/locale/ar chrome/locale/de-AT chrome/locale/de-CH chrome/locale/de-DE chrome/locale/el-GR chrome/locale/en-US chrome/locale/es chrome/locale/fa-IR chrome/locale/fr-FR chrome/locale/hr-HR chrome/locale/it-IT chrome/locale/nl-NL chrome/locale/pl-PL chrome/locale/pt-BR chrome/locale/ru chrome/locale/sl-SI chrome/locale/zh-CN chrome/locale/zh-TW components defaults/preferences)
mikeperry at seul.org
mikeperry at seul.org
Mon Jun 9 06:08:39 UTC 2008
Author: mikeperry
Date: 2008-06-09 02:08:38 -0400 (Mon, 09 Jun 2008)
New Revision: 15080
Modified:
torbutton/trunk/src/chrome/content/preferences.js
torbutton/trunk/src/chrome/content/preferences.xul
torbutton/trunk/src/chrome/content/torbutton.js
torbutton/trunk/src/chrome/locale/ar/torbutton.dtd
torbutton/trunk/src/chrome/locale/de-AT/torbutton.dtd
torbutton/trunk/src/chrome/locale/de-CH/torbutton.dtd
torbutton/trunk/src/chrome/locale/de-DE/torbutton.dtd
torbutton/trunk/src/chrome/locale/el-GR/torbutton.dtd
torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
torbutton/trunk/src/chrome/locale/es/torbutton.dtd
torbutton/trunk/src/chrome/locale/fa-IR/torbutton.dtd
torbutton/trunk/src/chrome/locale/fr-FR/torbutton.dtd
torbutton/trunk/src/chrome/locale/hr-HR/torbutton.dtd
torbutton/trunk/src/chrome/locale/it-IT/torbutton.dtd
torbutton/trunk/src/chrome/locale/nl-NL/torbutton.dtd
torbutton/trunk/src/chrome/locale/pl-PL/torbutton.dtd
torbutton/trunk/src/chrome/locale/pt-BR/torbutton.dtd
torbutton/trunk/src/chrome/locale/ru/torbutton.dtd
torbutton/trunk/src/chrome/locale/sl-SI/torbutton.dtd
torbutton/trunk/src/chrome/locale/zh-CN/torbutton.dtd
torbutton/trunk/src/chrome/locale/zh-TW/torbutton.dtd
torbutton/trunk/src/components/nsSessionStore.js
torbutton/trunk/src/defaults/preferences/preferences.js
Log:
We should provide a pref to not store Non-Tor pages in the
session store for people who want to always start their
browser in Tor and not worry about all their non-tor pages
flying through Tor during a session restore. Also, yay more
strings.
Modified: torbutton/trunk/src/chrome/content/preferences.js
===================================================================
--- torbutton/trunk/src/chrome/content/preferences.js 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/content/preferences.js 2008-06-09 06:08:38 UTC (rev 15080)
@@ -211,6 +211,7 @@
}
doc.getElementById('torbutton_noTorSessionStore').checked = o_torprefs.getBoolPref('notor_sessionstore');
+ doc.getElementById('torbutton_noNonTorSessionStore').checked = o_torprefs.getBoolPref('nonontor_sessionstore');
//doc.getElementById('torbutton_reloadCrashedJar').checked = o_torprefs.getBoolPref('reload_crashed_jar');
@@ -326,6 +327,7 @@
}
o_torprefs.setBoolPref('notor_sessionstore', doc.getElementById('torbutton_noTorSessionStore').checked);
+ o_torprefs.setBoolPref('nonontor_sessionstore', doc.getElementById('torbutton_noNonTorSessionStore').checked);
//o_torprefs.setBoolPref('reload_crashed_jar', doc.getElementById('torbutton_reloadCrashedJar').checked);
o_torprefs.setBoolPref('block_thread', doc.getElementById('torbutton_blockTorHRead').checked);
o_torprefs.setBoolPref('block_thwrite', doc.getElementById('torbutton_blockTorHWrite').checked);
Modified: torbutton/trunk/src/chrome/content/preferences.xul
===================================================================
--- torbutton/trunk/src/chrome/content/preferences.xul 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/content/preferences.xul 2008-06-09 06:08:38 UTC (rev 15080)
@@ -246,6 +246,8 @@
</hbox>
<checkbox class="indent" id="torbutton_noTorSessionStore" label="&torbutton.prefs.notor_sessionstore;"
oncommand="torbutton_prefs_set_field_attributes(document)"/>
+ <checkbox class="indent" id="torbutton_noNonTorSessionStore" label="&torbutton.prefs.nonontor_sessionstore;"
+ oncommand="torbutton_prefs_set_field_attributes(document)"/>
</vbox>
</tabpanel>
Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/content/torbutton.js 2008-06-09 06:08:38 UTC (rev 15080)
@@ -1820,7 +1820,7 @@
if(m_tb_prefs.getBoolPref("extensions.torbutton.noncrashed")) {
var startup_state = m_tb_prefs.getIntPref("extensions.torbutton.startup_state");
- torbutton_log(3, "Setting inital state to: "+startup_state);
+ torbutton_log(3, "Setting initial state to: "+startup_state);
if(startup_state == 0) {
torbutton_conditional_set(false); // must be boolean
Modified: torbutton/trunk/src/chrome/locale/ar/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/ar/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/ar/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/de-AT/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/de-AT/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/de-AT/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/de-CH/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/de-CH/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/de-CH/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/de-DE/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/de-DE/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/de-DE/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/el-GR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/el-GR/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/el-GR/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -60,7 +60,7 @@
<!ENTITY torbutton.prefs.forms "Forms">
<!ENTITY torbutton.prefs.block_tforms "Block password+form saving during Tor (recommended)">
<!ENTITY torbutton.prefs.block_ntforms "Block password+form saving during Non-Tor (optional)">
-<!ENTITY torbutton.prefs.notor_sessionstore "Prevent session store from saving Tor-loaded tabs (recommended)">
+<!ENTITY torbutton.prefs.notor_sessionstore "Prevent session store from saving Tor loaded tabs">
<!ENTITY torbutton.prefs.tor "Tor">
<!ENTITY torbutton.prefs.non_tor "Non-Tor">
<!ENTITY torbutton.prefs.restore_tor "On crash recovery or session restored startup, restore via:">
@@ -79,3 +79,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/es/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/es/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/es/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/fa-IR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/fa-IR/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/fa-IR/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/fr-FR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/fr-FR/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/fr-FR/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/hr-HR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/hr-HR/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/hr-HR/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/it-IT/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/it-IT/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/it-IT/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -79,3 +79,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/nl-NL/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/nl-NL/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/nl-NL/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/pl-PL/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/pl-PL/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/pl-PL/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/pt-BR/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/pt-BR/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/pt-BR/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/ru/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/ru/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/ru/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/sl-SI/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/sl-SI/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/sl-SI/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/zh-CN/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/zh-CN/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/zh-CN/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/chrome/locale/zh-TW/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/zh-TW/torbutton.dtd 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/chrome/locale/zh-TW/torbutton.dtd 2008-06-09 06:08:38 UTC (rev 15080)
@@ -77,3 +77,4 @@
<!ENTITY torbutton.prefs.startup_state "On normal startup, set Tor state to:">
<!ENTITY torbutton.prefs.shutdown_state "Shutdown state">
<!ENTITY torbutton.prefs.startup "Startup">
+<!ENTITY torbutton.prefs.nonontor_sessionstore "Prevent session store from saving Non-Tor loaded tabs">
Modified: torbutton/trunk/src/components/nsSessionStore.js
===================================================================
--- torbutton/trunk/src/components/nsSessionStore.js 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/components/nsSessionStore.js 2008-06-09 06:08:38 UTC (rev 15080)
@@ -780,6 +780,7 @@
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var bypass_tor = prefs.getBoolPref("extensions.torbutton.notor_sessionstore");
+ var bypass_nontor = prefs.getBoolPref("extensions.torbutton.nonontor_sessionstore");
for (var i = 0; i < browsers.length; i++) {
var tabData = { entries: [], index: 0 };
@@ -791,6 +792,11 @@
//tabs.push(tabData);
continue;
}
+ if(bypass_nontor && typeof(browser.__tb_tor_fetched) != "undefined" &&
+ !browser.__tb_tor_fetched) {
+ continue;
+ }
+
if (!browser || !browser.currentURI) {
// can happen when calling this function right after .addTab()
tabs.push(tabData);
Modified: torbutton/trunk/src/defaults/preferences/preferences.js
===================================================================
--- torbutton/trunk/src/defaults/preferences/preferences.js 2008-06-09 05:51:39 UTC (rev 15079)
+++ torbutton/trunk/src/defaults/preferences/preferences.js 2008-06-09 06:08:38 UTC (rev 15080)
@@ -80,6 +80,7 @@
pref("extensions.torbutton.no_search",true);
pref("extensions.torbutton.set_uagent",true);
pref("extensions.torbutton.notor_sessionstore",true);
+pref("extensions.torbutton.nonontor_sessionstore",false);
pref("extensions.torbutton.restore_tor",false);
pref("extensions.torbutton.reload_crashed_jar",true);
pref("extensions.torbutton.spoof_english",true);
More information about the tor-commits
mailing list