https://github.com/terrafrost/firefox-x-forwarded-for-spoofer
That’s an addon I’m trying to revive that’s not working in the latest version of Firefox and I’m trying to find out why.
Near as I can tell the component isn’t working and I’ve no idea as to why.
I’ve tried making the chrome.manifest file read as follows:
content x-forwarded-for chrome/content/
overlay chrome://browser/content/browser.xul chrome://x-forwarded-for/content/overlay.xul
locale x-forwarded-for en-US chrome/locale/en-US/
component ec8030f7-c20a-464f-9b0e-13a3a9e97384 components/x-forwarded-for.js
contract @x-forwarded-for@frostjedi.com/x-forwarded-for.js;1 ec8030f7-c20a-464f-9b0e-13a3a9e97384
I’ve also tried @frostjedi.com/x-forwarded-for;1 (which is what x-forwarded-for.js has as the contract id but that didn’t help) to no avail.
Any ideas?
The ID you list in
chrome.manifestshould be the component ID, not the extension ID. Also, the contract ID seems to be incorrect, probably a copy&paste mistake. The correct lines would be:The component itself needs to be modified as well – to be compatible with Firefox 4 and above it should expose an
NSGetFactoryfunction instead ofNSGetModule. It is highly recommendable to useXPCOMUtils.jsmmodule for that, it will do most of the work for you. You can throw out the entire module definition and replace it by the following lines:Note that you no longer have to declare component ID and contract ID in the component itself, the entries in
chrome.manifestare sufficient for Firefox 4 and above.For reference: XPCOM changes in Gecko 2.0