Bug 1782750 [wpt PR 35307] - Implement "fire a toggle activation" and "change a toggl...
[gecko.git] / toolkit / content / resetProfile.js
blobcaef7a12894c887077c83600d4786a95207953f0
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 "use strict";
7 document.addEventListener("dialogaccept", onResetProfileAccepted);
8 document
9   .getElementById("refreshProfileLearnMore")
10   .addEventListener("click", e => {
11     e.preventDefault();
12     let retVals = window.arguments[0];
13     retVals.learnMore = true;
14     window.close();
15   });
17 document.addEventListener("DOMContentLoaded", function() {
18   document
19     .getElementById("resetProfileDialog")
20     .getButton("accept")
21     .classList.add("danger-button");
22 });
24 function onResetProfileAccepted() {
25   let retVals = window.arguments[0];
26   retVals.reset = true;