Commit 08ab94d7 authored by Mike Perry's avatar Mike Perry
Browse files

Bug 3838: Inform Torbutton users about TBB

We launch a confirm dialog when they click on the button.
parent 03db5041
......@@ -629,6 +629,30 @@ function torbutton_prompt_for_language_preference() {
m_tb_prefs.setBoolPref("extensions.torbutton.prompted_language", true);
function torbutton_inform_about_tbb() {
var prompts = Cc[";1"]
var flags = prompts.BUTTON_POS_0 * prompts.BUTTON_TITLE_OK;
var strings = torbutton_get_stringbundle();
var message = strings.GetStringFromName("torbutton.popup.prompt_torbrowser");
var checkbox = {value: false};
var sb = Components.classes[";1"]
var browserstrings = sb.createBundle("chrome://browser/locale/");
var askagain = browserstrings.GetStringFromName("privateBrowsingNeverAsk");
var response = prompts.confirmEx(null, "", message, flags, null, null, null,
askagain, checkbox);
// Update preferences to reflect their response and to prevent the prompt from
// being displayed again.
m_tb_prefs.setBoolPref("extensions.torbutton.prompt_torbrowser", !checkbox.value);
//this function checks to see if the context menu is being clicked on a link.
//if it is, then we show the two context menu items
function torbutton_check_contextmenu() {
......@@ -2219,6 +2243,10 @@ function torbutton_check_protections()
if (!m_tb_control_pass || !m_tb_control_port)
document.getElementById("torbutton-new-identity").disabled = true;
if (!m_tb_tbb && m_tb_prefs.getBoolPref("extensions.torbutton.prompt_torbrowser")) {
function torbutton_open_cookie_dialog() {
......@@ -40,3 +40,4 @@ torbutton.popup.use_tbb = It appears that you are using Torbutton with Firefox,
torbutton.popup.pref_error = Torbutton cannot update preferences in the Tor Browser profile directory.
torbutton.popup.permission_denied = Please either reset the permissions of the Tor Browser directory or copy it to a new location.
torbutton.popup.device_full = The disk appears to be full. Please free up space or move Tor Browser to a new device.
torbutton.popup.prompt_torbrowser = Torbutton is no longer safe to use in a browser that is also used for non-Tor browsing. We have disabled the ability to toggle Torbutton as a result.\n\nIf you wish to keep using Firefox for non-Tor browsing, you should uninstall Torbutton and download Tor Browser. The privacy properties of Tor Browser are also superior to those of normal Firefox, even when Firefox is used with Torbutton.
......@@ -220,3 +220,4 @@ pref("extensions.torbutton.useragent_vendorSub","");
pref("extensions.torbutton.safecache",1); // 0=always, 1=during tor, 2=never
pref("extensions.torbutton.cookie_js_allow", true);
pref("extensions.torbutton.prompt_torbrowser", true);
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