2014-06-25 05:12:07 +00:00
|
|
|
/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
|
2013-03-19 17:46:13 +00: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 18:19:45 +00:00
|
|
|
var gSanitizeDialog = Object.freeze({
|
2015-02-05 14:09:23 +00:00
|
|
|
init: function() {
|
|
|
|
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-11 23:58:04 +00:00
|
|
|
this.onClearHistoryChanged();
|
2015-02-05 14:09:23 +00:00
|
|
|
},
|
|
|
|
|
2013-03-19 17:46:13 +00:00
|
|
|
onClearHistoryChanged: function () {
|
|
|
|
let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
|
|
|
|
let historyPref = document.getElementById("privacy.clearOnShutdown.history");
|
|
|
|
downloadsPref.value = historyPref.value;
|
|
|
|
}
|
|
|
|
});
|