diff options
Diffstat (limited to '')
-rw-r--r-- | comm/suite/components/pref/content/pref-privatedata.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/comm/suite/components/pref/content/pref-privatedata.js b/comm/suite/components/pref/content/pref-privatedata.js new file mode 100644 index 0000000000..ba7305bc41 --- /dev/null +++ b/comm/suite/components/pref/content/pref-privatedata.js @@ -0,0 +1,30 @@ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +function Startup() { + let pref = document.getElementById("privacy.sanitize.sanitizeOnShutdown"); + updateClearOnShutdownBox(pref.valueFromPreferences); +} + +/** + * Disable/enable clear on shutdown items in dialog depending on general pref + * to clear on shutdown. + */ +function updateClearOnShutdownBox(aDisable) { + let clearOnShutdownBox = document.getElementById("clearOnShutdownBox"); + for (let childNode of clearOnShutdownBox.childNodes) { + childNode.disabled = !aDisable; + } +} + +/** + * Displays a dialog from which individual parts of private data may be + * cleared. + */ +function clearPrivateDataNow() { + Cc["@mozilla.org/suite/suiteglue;1"] + .getService(Ci.nsISuiteGlue) + .sanitize(window); +} |