1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-26 18:15:48 +01:00

Show the hg revision and date in :version where possible when running from a repo.

This commit is contained in:
Kris Maglione
2010-12-28 19:10:51 -05:00
parent 0592641702
commit 80968ef92f
4 changed files with 134 additions and 100 deletions

View File

@@ -59,7 +59,12 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
}
},
get addon() services.fuel.storage.get("dactyl.bootstrap", null).addon,
addon: Class.memoize(function () {
let addon = services.fuel.storage.get("dactyl.bootstrap", {}).addon;
if (!addon)
addon = AddonManager.getAddonByID(services["dactyl:"].addonID);
return addon;
}),
// FIXME: Only works for Pentadactyl
get activeWindow() services.windowMediator.getMostRecentWindow("navigator:browser"),