Index: lib/uninstall.js |
=================================================================== |
--- a/lib/uninstall.js |
+++ b/lib/uninstall.js |
@@ -36,18 +36,12 @@ |
search.join("&")); |
} |
-function onPrefsLoaded() |
-{ |
- Prefs.onLoaded.removeListener(onPrefsLoaded); |
- setUninstallURL(); |
-} |
- |
// The uninstall URL contains the notification download count as a parameter, |
// therefore we must wait for preferences to be loaded before generating the |
// URL and we need to re-generate it each time the notification data changes. |
if ("setUninstallURL" in chrome.runtime) |
{ |
- Prefs.onLoaded.addListener(onPrefsLoaded); |
+ Prefs.isLoaded.then(setUninstallURL); |
Prefs.onChanged.addListener(function(name) |
{ |
if (name == "notificationdata") |