[Pkg-mozext-commits] [adblock-plus] 234/464: Added application property to the info pseudo-module
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:20 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit ed9900b4e86e7da747c0986614efe3f4e037e3f9
Author: Wladimir Palant <trev at adblockplus.org>
Date: Fri May 11 10:33:59 2012 +0200
Added application property to the info pseudo-module
---
bootstrap.js.tmpl | 4 ++++
packager.py | 1 +
2 files changed, 5 insertions(+)
diff --git a/bootstrap.js.tmpl b/bootstrap.js.tmpl
index 1364b68..33577c9 100644
--- a/bootstrap.js.tmpl
+++ b/bootstrap.js.tmpl
@@ -100,6 +100,9 @@ function require(module)
{%- if 'info' in requires %}
if (module == "info")
{
+ let applications = {{applications|json}};
+ let appID = Services.appinfo.ID;
+
scopes[module] = {};
scopes[module].exports =
{
@@ -107,6 +110,7 @@ function require(module)
addonVersion: addonData.version,
addonRoot: addonData.resourceURI.spec,
addonName: "{{metadata.get('general', 'basename')}}",
+ application: (appID in applications ? applications[appID] : "other"),
};
}
else
diff --git a/packager.py b/packager.py
index ee3c37b..4f955d4 100644
--- a/packager.py
+++ b/packager.py
@@ -225,6 +225,7 @@ def addMissingFiles(baseDir, params, files):
'chromeWindows': [],
'requires': {},
'metadata': params['metadata'],
+ 'applications': dict((v, k) for k, v in KNOWN_APPS.iteritems()),
}
def checkScript(name):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list