Restore the backuped user pref when this addon is disabled or removed.
This commit is contained in:
parent
92d98ba51b
commit
5042651b81
@ -410,7 +410,11 @@ TreeStyleTabWindow.prototype = {
|
|||||||
let pref = restorePrefs[i];
|
let pref = restorePrefs[i];
|
||||||
let backup = prefs.getPref(pref+'.backup');
|
let backup = prefs.getPref(pref+'.backup');
|
||||||
if (backup === null) continue;
|
if (backup === null) continue;
|
||||||
prefs.setPref(pref+'.override', backup); // we have to set to ".override" pref, to avoid unexpectedly reset by the preference listener.
|
// we have to set to ".override" pref, to avoid unexpectedly reset by the preference listener.
|
||||||
|
prefs.setPref(pref+'.override', backup);
|
||||||
|
// restore user preference.
|
||||||
|
prefs.setPref(pref, backup);
|
||||||
|
// clear backup pref.
|
||||||
prefs.clearPref(pref+'.backup');
|
prefs.clearPref(pref+'.backup');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user