Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support Firefox 4.0

  • Loading branch information...
commit 23568fd058fc47f1e180aaac6dff6266d7ef98d6 1 parent be46540
@mooz authored
View
4 chrome.manifest
@@ -10,3 +10,7 @@ resource keysnail-share share/
resource keysnail-scheme schemes/
overlay chrome://browser/content/browser.xul chrome://keysnail/content/browser.xul
+
+component {ed3f874d-1b4d-40f2-a19a-e424156ac49b} components/keysnail-loader.js
+contract @github.com/mooz/keysnail/loader;1 {ed3f874d-1b4d-40f2-a19a-e424156ac49b}
+category profile-after-change @github.com/mooz/keysnail/loader;1 @github.com/mooz/keysnail/loader;1
View
4 chrome.manifest.pack
@@ -9,3 +9,7 @@ resource keysnail-share share/
resource keysnail-scheme schemes/
overlay chrome://browser/content/browser.xul chrome://keysnail/content/browser.xul
+
+component {ed3f874d-1b4d-40f2-a19a-e424156ac49b} components/keysnail-loader.js
+contract @github.com/mooz/keysnail/loader;1 {ed3f874d-1b4d-40f2-a19a-e424156ac49b}
+category profile-after-change @github.com/mooz/keysnail/loader;1 @github.com/mooz/keysnail/loader;1
View
24 components/keysnail-loader.js
@@ -14,7 +14,12 @@ const CID = Components.ID('{ed3f874d-1b4d-40f2-a19a-e424156ac49b}');
const CONTRACT_ID = '@github.com/mooz/keysnail/loader;1';
const CLASS_NAME = 'KeySnail Loader';
-const STARTUP_TOPIC = 'app-startup';
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+
+if (XPCOMUtils.generateNSGetFactory)
+ var STARTUP_TOPIC = 'profile-after-change'; // for gecko 2.0
+else
+ var STARTUP_TOPIC = 'app-startup';
function loadScript(path, context) {
const loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
@@ -158,7 +163,11 @@ KeySnailLoader.prototype = {
throw Components.results.NS_ERROR_NO_INTERFACE;
}
return this;
- }
+ },
+
+ classDescription: CLASS_NAME,
+ contractID: CONTRACT_ID,
+ classID: CID
};
var module = {
@@ -206,6 +215,11 @@ var module = {
}
};
-function NSGetModule(aCompMgr, aFileSpec) {
- return module;
-}
+// function NSGetModule(aCompMgr, aFileSpec) {
+// return module;
+// }
+
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([KeySnailLoader]);
+else
+ var NSGetModule = function (aCompMgr, aFileSpec) { return module; };
View
4 install.rdf
@@ -6,7 +6,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>keysnail@mooz.github.com</em:id>
<em:type>2</em:type> <!-- type of the addon, 2 means the extension -->
- <em:version>1.6.2</em:version>
+ <em:version>1.6.3</em:version>
<em:name>KeySnail</em:name>
<em:creator>mooz</em:creator>
<em:developer>mooz</em:developer>
@@ -32,7 +32,7 @@
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.0</em:minVersion>
- <em:maxVersion>3.7a5pre</em:maxVersion>
+ <em:maxVersion>4.0b2pre</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
Please sign in to comment.
Something went wrong with that request. Please try again.