[Pkg-mozext-commits] [perspectives-extension] 12/44: Pers_init - only toggle first_run after work is complete
David Prévot
taffit at moszumanska.debian.org
Sun Jun 26 04:59:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository perspectives-extension.
commit d237968e60125caa02372257a9b7e828d55a6844
Author: Dave Schaefer <dave.schaefer at gmail.com>
Date: Tue Jun 7 21:07:54 2016 -0700
Pers_init - only toggle first_run after work is complete
If any errors happen we may need to do it again.
Also declare constant string as const
---
plugin/chrome/content/init.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/plugin/chrome/content/init.js b/plugin/chrome/content/init.js
index 0e9eac2..9be5fc2 100644
--- a/plugin/chrome/content/init.js
+++ b/plugin/chrome/content/init.js
@@ -30,9 +30,9 @@ var Pers_init = {
// so we have access to the stringbundle from statusbar.xul
Perspectives.prompt_update();
- var firstrun = root_prefs.getBoolPref("extensions.perspectives.first_run");
+ const FIRSTRUN_PREF = "extensions.perspectives.first_run";
+ var firstrun = root_prefs.getBoolPref(FIRSTRUN_PREF);
if (firstrun) {
- root_prefs.setBoolPref("extensions.perspectives.first_run", false);
var bname = "perspectives-status-button";
if (!document.getElementById(bname)) {
@@ -42,6 +42,7 @@ var Pers_init = {
// else the user has already added the button previously
// we don't want to touch it
+ root_prefs.setBoolPref(FIRSTRUN_PREF, false);
}
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/perspectives-extension.git
More information about the Pkg-mozext-commits
mailing list