Skip to content

Commit

Permalink
Support Firefox 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mooz committed Jul 6, 2010
1 parent be46540 commit 23568fd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
4 changes: 4 additions & 0 deletions chrome.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions chrome.manifest.pack
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 19 additions & 5 deletions components/keysnail-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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; };
4 changes: 2 additions & 2 deletions install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit 23568fd

Please sign in to comment.