michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: michael@0: const {classes: Cc, interfaces: Ci, utils: Cu} = Components; michael@0: michael@0: Cu.import("resource://gre/modules/Services.jsm"); michael@0: michael@0: let service = Cc["@mozilla.org/weave/service;1"] michael@0: .getService(Ci.nsISupports) michael@0: .wrappedJSObject; michael@0: michael@0: if (!service.allowPasswordsEngine) { michael@0: let checkbox = document.getElementById("fxa-pweng-chk"); michael@0: checkbox.checked = false; michael@0: checkbox.disabled = true; michael@0: } michael@0: michael@0: addEventListener("dialogaccept", function () { michael@0: let pane = document.getElementById("sync-customize-pane"); michael@0: pane.writePreferences(true); michael@0: window.arguments[0].accepted = true; michael@0: });