2014-06-25 09:12:07 +04:00
|
|
|
/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
|
2013-03-19 21:46:13 +04:00
|
|
|
/* 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/. */
|
|
|
|
|
2015-09-15 21:19:45 +03:00
|
|
|
var gSanitizeDialog = Object.freeze({
|
2016-12-30 02:34:54 +03:00
|
|
|
init() {
|
2015-02-05 17:09:23 +03:00
|
|
|
let customWidthElements = document.getElementsByAttribute("dialogWidth", "*");
|
|
|
|
let isInSubdialog = document.documentElement.hasAttribute("subdialog");
|
|
|
|
for (let element of customWidthElements) {
|
|
|
|
element.style.width = element.getAttribute(isInSubdialog ? "subdialogWidth" : "dialogWidth");
|
|
|
|
}
|
2015-03-12 02:58:04 +03:00
|
|
|
this.onClearHistoryChanged();
|
2015-02-05 17:09:23 +03:00
|
|
|
},
|
|
|
|
|
2016-12-30 02:34:54 +03:00
|
|
|
onClearHistoryChanged() {
|
2013-03-19 21:46:13 +04:00
|
|
|
let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
|
|
|
|
let historyPref = document.getElementById("privacy.clearOnShutdown.history");
|
|
|
|
downloadsPref.value = historyPref.value;
|
|
|
|
}
|
|
|
|
});
|