We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

I need to edit the .js file for an add-on, but my text editor won't let me

more options

I'm sorry to have to include much detail, as I really don't understand what is important or not for this question. Using FF43.0.2 and Snow Leopard. A forum using the file name gave no hits.

The add-on file that needs editing is dstocks2.js (/Users/cglenn/Library/Application Support/Firefox/Profiles/a683761i.default/extensions/[email protected]/chrome/content/dstocks2.js). However, the file does not exist in Finder. Instead, in Finder, I go to [email protected], click on that, and my text editor (TextWrangler) opens that file. In finder, the .xpi file is the end file with no sub-flolders, but in textwrangler, new folder are "created", so that the file path is [email protected]/chrome/content/dstocks2.js.

Since this file does not "exist" for searching, I can't select the file and edit it. When I try, textwrangler says I must save dstocks2.js to a file to edit, so I finish that dialog, but the file is not saved, even when FF is closed.

I'm at a loss how to edit the dstocks2.js file.

I'm sorry to have to include much detail, as I really don't understand what is important or not for this question. Using FF43.0.2 and Snow Leopard. A forum using the file name gave no hits. The add-on file that needs editing is dstocks2.js (/Users/cglenn/Library/Application Support/Firefox/Profiles/a683761i.default/extensions/[email protected]/chrome/content/dstocks2.js). However, the file does not exist in Finder. Instead, in Finder, I go to [email protected], click on that, and my text editor (TextWrangler) opens that file. In finder, the .xpi file is the end file with no sub-flolders, but in textwrangler, new folder are "created", so that the file path is [email protected]/chrome/content/dstocks2.js. Since this file does not "exist" for searching, I can't select the file and edit it. When I try, textwrangler says I must save dstocks2.js to a file to edit, so I finish that dialog, but the file is not saved, even when FF is closed. I'm at a loss how to edit the dstocks2.js file.

All Replies (4)

more options

I don't see a 'edit post' tab, so here is my edit to the above post:

By copy>paste, I was able to create a new dstocks2.js file, with the edits, on my desktop. But now the issue is how to copy this file to where it goes. As said above, I can't get there with Finder.

more options

This "signing" thing in Firefox 43 and later precludes users from doing hacks like that.

Sorry, I don't know anything about the text editor in MacOSX. But if you edit any file in an XPI package, it will break the signing "seal" for the add-on. Changes like that would require the XPI to be signed again - but it ain't that easy.

more options

An XPI file is a ZIP archive. If Finder can't search for files in a ZIP archive and open such a file then you would have to use an archive manager. Note that you can open such a file in Firefox for inspection via the chrome protocol.

  • chrome://dstocks2/content/dstocks2.js

But you can't modify (edit) this file because that will break the signing information stored in the META-INF folder.

more options

What kind of edit is needed? You could try contacting the author Didier Lafleur about the problem at [email protected] and see whether you can get it fixed officially.