Modifying TinyMce files: where is zotero.jar and how to edit zotero@chnm.gmu.edu.xpi
In short :
What I want : to modify some TinyMce files.
My questions :
- Where is the zotero.jar?
- Is zotero@chnm.gmu.edu.xpi another version of zotero.jar
- Can I edit zotero@chnm.gmu.edu.xpi (which contains the TinyMce files) and if yes, how to edit it so that the modified zotero@chnm.gmu.edu.xpi is accepted by Firefox?
In details:
Where is the zotero.jar?
As per that page https://www.zotero.org/support/dev/modifying_zotero_files and that thread https://groups.google.com/forum/#!topic/zotero-dev/nmtCLEb9zLA, I should modify the zotero.jar to make change to TinyMce. But I can't find it.
I searched in:
- C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\.default\zotero (folder not found)
- [profile]/extensions
- [profile]/extensions/zotero@chnm.gmu.edu/chrome/zotero.jar (folder zotero@chnm.gmu.edu not found)
- My Zotero library C:\Users\\Desktop\Zotero Library
One thread mentioned that I should "right clik on the Zotero application and select "Show package contents", the JAR is inside". But I right-clicked on about anything I could think of that related (even loosely) to what might be "Zotero application" without finding the "Show package contents"
Finally I did a Window search on all Firefox/[profile] and my whole C:\ drive and even windows couldn't find it. (I ask a friend who also uses Zotero and he couldn't find it either)
Instead of the zotero.jar, I found zotero@chnm.gmu.edu.xpi in [profile]\extensions which contains the TinyMce files in resource\tinymce I am looking for.
I am not sure if I should edit zotero@chnm.gmu.edu.xpi but because I couldn't find zotero.jar, I aussmed it's the equivalent of zotero.jar and I went ahead, but Firefox doesn't accept my edits, so question#3:
How to edit the zotero@chnm.gmu.edu.xpi so that it is accepted by Firefox?
The problem is that if I unzip this .xpi, edit some files, zip them backup and put back the edited zotero@chnm.gmu.edu.xpi in the extension folder of my Firefox profile, and then launch Firefox, I get this error: "one or more installed add-ons cannot be verified and have been disabled". (The add-ons in question is Zotero!)
If I unzip this edited zotero@chnm.gmu.edu.xpi, remove all my edits and zip all the files, then Firefox starts normally and doesn't give me an error. This seems to indicate that I am not making an error when zipping (like compressing the file or zipping the folder instead of the files) but that it's really the edits that are causing the trouble
If it is of some importance, the file I modified so far is zotero@chnm.gmu.edu\resource\tinymce\utils\validate.js (even adding 1 word inside a comment causes the "not recognized message")
What I want : to modify some TinyMce files.
My questions :
- Where is the zotero.jar?
- Is zotero@chnm.gmu.edu.xpi another version of zotero.jar
- Can I edit zotero@chnm.gmu.edu.xpi (which contains the TinyMce files) and if yes, how to edit it so that the modified zotero@chnm.gmu.edu.xpi is accepted by Firefox?
In details:
Where is the zotero.jar?
As per that page https://www.zotero.org/support/dev/modifying_zotero_files and that thread https://groups.google.com/forum/#!topic/zotero-dev/nmtCLEb9zLA, I should modify the zotero.jar to make change to TinyMce. But I can't find it.
I searched in:
- C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\.default\zotero (folder not found)
- [profile]/extensions
- [profile]/extensions/zotero@chnm.gmu.edu/chrome/zotero.jar (folder zotero@chnm.gmu.edu not found)
- My Zotero library C:\Users\\Desktop\Zotero Library
One thread mentioned that I should "right clik on the Zotero application and select "Show package contents", the JAR is inside". But I right-clicked on about anything I could think of that related (even loosely) to what might be "Zotero application" without finding the "Show package contents"
Finally I did a Window search on all Firefox/[profile] and my whole C:\ drive and even windows couldn't find it. (I ask a friend who also uses Zotero and he couldn't find it either)
Instead of the zotero.jar, I found zotero@chnm.gmu.edu.xpi in [profile]\extensions which contains the TinyMce files in resource\tinymce I am looking for.
I am not sure if I should edit zotero@chnm.gmu.edu.xpi but because I couldn't find zotero.jar, I aussmed it's the equivalent of zotero.jar and I went ahead, but Firefox doesn't accept my edits, so question#3:
How to edit the zotero@chnm.gmu.edu.xpi so that it is accepted by Firefox?
The problem is that if I unzip this .xpi, edit some files, zip them backup and put back the edited zotero@chnm.gmu.edu.xpi in the extension folder of my Firefox profile, and then launch Firefox, I get this error: "one or more installed add-ons cannot be verified and have been disabled". (The add-ons in question is Zotero!)
If I unzip this edited zotero@chnm.gmu.edu.xpi, remove all my edits and zip all the files, then Firefox starts normally and doesn't give me an error. This seems to indicate that I am not making an error when zipping (like compressing the file or zipping the folder instead of the files) but that it's really the edits that are causing the trouble
If it is of some importance, the file I modified so far is zotero@chnm.gmu.edu\resource\tinymce\utils\validate.js (even adding 1 word inside a comment causes the "not recognized message")
This discussion has been closed.
In general, this isn't a good idea. While you can modify the files in your locally installed client, any changes you make will be undone the next time Zotero is updated. Manually modifying the client will thus require ether frequently re-applying your changes or not installing Zotero updates (which is a very bad idea and will very likely cause lots of problems).