aboutsummaryrefslogtreecommitdiff
path: root/chrome/js/component.js
diff options
context:
space:
mode:
authorEinar Egilsson2011-09-04 22:53:16 +0200
committerEinar Egilsson2011-09-04 22:53:16 +0200
commit4b612baf4f29178214edec130856d83a40bf473d (patch)
tree20e36e3fcf7a24e829640c2fd605622f14af0edc /chrome/js/component.js
parent8fb65cf8aeaaf66636698310c0168929fc1a2ce0 (diff)
Total restructuring of files and deletion of old files
Diffstat (limited to 'chrome/js/component.js')
-rw-r--r--chrome/js/component.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/js/component.js b/chrome/js/component.js
new file mode 100644
index 0000000..7b19109
--- /dev/null
+++ b/chrome/js/component.js
@@ -0,0 +1,21 @@
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+Ci = Components.interfaces;
+Cr = Components.results;
+
+Components.utils.import("chrome://redirector/content/js/redirector.js");
+
+function RedirectorComponent() { }
+
+RedirectorComponent.prototype = {
+ classDescription: "My Hello World Javascript XPCOM Component",
+ classID: Components.ID("{b7a7a54f-0581-47ff-b086-d6920cb7a3f7}"),
+ contractID: "@einaregilsson.com/redirector;1",
+ QueryInterface: function(iid) {
+ if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIContentPolicy) || iid.equals(Ci.nsIChannelEventSink)) {
+ return Redirector;
+ }
+ throw Cr.NS_ERROR_NO_INTERFACE;
+ }
+};
+
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([RedirectorComponent]);