Merge pull request #581 from mozilla/contribute-data-pref

Fix #580
This commit is contained in:
monicachew 2014-05-15 09:32:50 -07:00
Родитель 2a20d4c706 564d0904d0
Коммит 656bd7a060
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -3,6 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* jshint moz: true */
(function (global) {
// In 1.0.9 and before, the contribute data pref was kept in localStorage. In
// 1.0.10, all prefs are stored in the pref manager. If a previous pref exists,
// send it back to the addon. This logic is ridiculous but it's what existed
// prior to 1.0.9, so just keep it in.
if (localStorage.userHasOptedIntoSharing === 'true') {
console.log("Restoring contribute data pref from localStorage");
let e = { "contributeData": true };
global.self.port.emit("prefChanged", e);
updateUIFromPrefs(e);
localStorage.clear();
}
// Bunch of utilities related to UI elements.
const graphNodeRadius = {
"graph": 12