Reputation: 11
I was wondering if anyone knows how to override firefox components. I have tried to override the nsHelperAppDlg.js
using the manifest file but it didn't seem to work. This is what I did:
override resource:///components/nsHelperAppDlg.js myextension/components/nsHelperAppDlg.js
I've also tried to modify that file straight from the omni.ja file but that didn't work either. Any ideas?
P.S I'm using Firefox 10.0.2
Upvotes: 0
Views: 705
Reputation: 57691
With the manifest you can only override chrome://
URLs. XPCOM components aren't accessed via chrome://
URLs but rather their contract IDs (@mozilla.org/helperapplauncherdialog;1
in this case). But I suspect that you don't really want to replace the component - it is rarely a good idea. You probably want to override or overlay the "unknown file type" dialog. The URL of this dialog is chrome://mozapps/content/downloads/unknownContentType.xul
and you can override it, like this:
override chrome://mozapps/content/downloads/unknownContentType.xul chrome://myextension/content/unknownContentType.xul
Upvotes: 2