[Pkg-mozext-commits] [greasemonkey] 15/41: Update greasemonkey.js

David Prévot taffit at moszumanska.debian.org
Thu Apr 30 22:06:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 1f8001561a33038a15e38b119e4af33611df8d0a
Author: janekptacijarabaci <janekptacijarabaci at users.noreply.github.com>
Date:   Tue Mar 31 13:05:11 2015 +0200

    Update greasemonkey.js
---
 components/greasemonkey.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/components/greasemonkey.js b/components/greasemonkey.js
index 9f16e2d..357f432 100644
--- a/components/greasemonkey.js
+++ b/components/greasemonkey.js
@@ -27,6 +27,13 @@ var gTmpDir = Components.classes["@mozilla.org/file/directory_service;1"]
     .getService(Components.interfaces.nsIProperties)
     .get("TmpD", Components.interfaces.nsIFile);
 
+var GM_GUID = "{e4a8a97b-f2ed-450b-b12d-ee082ba24781}";
+var gGreasemonkeyVersion = 'unknown';
+Cu.import("resource://gre/modules/AddonManager.jsm");
+AddonManager.getAddonByID(GM_GUID, function(addon) {
+  gGreasemonkeyVersion = '' + addon.version;
+});
+
 /////////////////////// Component-global Helper Functions //////////////////////
 
 
@@ -156,7 +163,7 @@ service.prototype.getScriptsForUrl = function(aMessage) {
     }
   }).map(function(script) {
     // Make the script serializable so it can be sent to the frame script.
-    return new IPCScript(script);
+    return new IPCScript(script, gGreasemonkeyVersion);
   });
 
   return scripts;
@@ -168,7 +175,7 @@ service.prototype.getScriptsForUuid = function(aMessage) {
       function(script) { return script.uuid == uuid; }
   ).map(function(script) {
     // Make the script serializable so it can be sent to the frame script.
-    return new IPCScript(script);
+    return new IPCScript(script, gGreasemonkeyVersion);
   });
   return scripts;
 };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list