Bug 1908842: update password generator prompt text r=android-reviewers,gl
[gecko.git] / browser / modules / TransientPrefs.sys.mjs
blobb9a66ca5cd008eb13bd2c6bb723a849bde1cee11
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 var prefVisibility = new Map();
7 /* Use for preferences that should only be visible when they've been modified.
8    When reset to their default state, they remain visible until restarting the
9    application. */
11 export var TransientPrefs = {
12   prefShouldBeVisible(prefName) {
13     if (Services.prefs.prefHasUserValue(prefName)) {
14       prefVisibility.set(prefName, true);
15     }
17     return !!prefVisibility.get(prefName);
18   },