sanitize.js (1288B)
1 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 /* import-globals-from /toolkit/content/preferencesBindings.js */ 7 8 Preferences.addAll([ 9 { id: "privacy.clearOnShutdown.history", type: "bool" }, 10 { id: "privacy.clearOnShutdown.formdata", type: "bool" }, 11 { id: "privacy.clearOnShutdown.downloads", type: "bool" }, 12 { id: "privacy.clearOnShutdown.cookies", type: "bool" }, 13 { id: "privacy.clearOnShutdown.cache", type: "bool" }, 14 { id: "privacy.clearOnShutdown.offlineApps", type: "bool" }, 15 { id: "privacy.clearOnShutdown.sessions", type: "bool" }, 16 { id: "privacy.clearOnShutdown.siteSettings", type: "bool" }, 17 ]); 18 19 var gSanitizeDialog = Object.freeze({ 20 init() { 21 this.onClearHistoryChanged(); 22 23 Preferences.get("privacy.clearOnShutdown.history").on( 24 "change", 25 this.onClearHistoryChanged.bind(this) 26 ); 27 }, 28 29 onClearHistoryChanged() { 30 let downloadsPref = Preferences.get("privacy.clearOnShutdown.downloads"); 31 let historyPref = Preferences.get("privacy.clearOnShutdown.history"); 32 downloadsPref.value = historyPref.value; 33 }, 34 });