Commit 430ccaa1 authored by Georg Koppen's avatar Georg Koppen
Browse files

Bug 9387: Version 0.9 of the Security Slider

Showing a notification to the user hinting at our new security slider
to adjust the security settings.
parent 35970c68
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -1044,6 +1044,34 @@ function torbutton_on_abouttor_load(aDoc) {

  if (m_tb_orig_BrowserOnAboutPageLoad)
    m_tb_orig_BrowserOnAboutPageLoad(aDoc);

  // Show the notification about the new security slider.
  if (m_tb_prefs.
      getBoolPref("extensions.torbutton.show_slider_notification")) {
    let sb = torbutton_get_stringbundle();
    let button_label =
      torbutton_get_property_string("torbutton.slider_notification_button");
    let box = gBrowser.getNotificationBox();

    let buttons = [{
      label: button_label,
      accessKey: 'S',
      popup: null,
      callback: function() {
        window.openDialog("chrome://torbutton/content/preferences.xul",
        "torbutton-preferences","chrome");}
    }];

    let priority = box.PRIORITY_INFO_LOW;
    let message =
      torbutton_get_property_string("torbutton.slider_notification");

    box.appendNotification(message, 'new-menu-notification',
                           "chrome://torbutton/skin/tor-enabled-16.png",
                           priority, buttons);
    m_tb_prefs.
      setBoolPref("extensions.torbutton.show_slider_notification", false);
  }
}

function torbutton_is_abouttor_doc(aDoc) {
+3 −0
Original line number Diff line number Diff line
@@ -55,6 +55,9 @@ torbutton.popup.confirm_plugins = Plugins such as Flash can harm your privacy an
torbutton.popup.never_ask_again = Never ask me again
torbutton.popup.confirm_newnym = Tor Browser will close all windows and tabs. All website sessions will be lost.\n\nRestart Tor Browser now to reset your identity?\n\n

torbutton.slider_notification = The green onion menu has now a security slider which lets you adjust your security level. Check it out!
torbutton.slider_notification_button = Open security settings

# Canvas permission prompt. Strings are kept here for ease of translation.
canvas.siteprompt=This website (%S) attempted to extract HTML5 canvas image data, which may be used to uniquely identify your computer.\n\nShould Tor Browser allow this website to extract HTML5 canvas image data?
canvas.notNow=Not Now
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@ pref("extensions.torbutton.restrict_thirdparty", true);
// Security Slider
pref("extensions.torbutton.security_slider", 4);
pref("extensions.torbutton.security_custom", false);
pref("extensions.torbutton.show_slider_notification", true);

// Google Captcha prefs
// FIXME: NID cookie?