Manish Goregaokar: Editing files from omni.ja in Firefox 20 onwards |
omni.ja files from live Firefox installs, so I'll just collect what I learned in this post.omni.ja. This is a rather quirky jar file that contains the JS and JS "binaries".omni.jas. The first in in /usr/lib/firefox, and the second is in /usr/lib/firefox/browser. These contain different code, so you may have to find out which one holds your JS.omni.ja is pretty simple. Copy omni.ja to a temporary directory, and run unzip omni.ja on it. (sudo apt-get install unzip may be necessary. Alternatively, use Ubuntu's Archive manager after renaming it to a .zip)omni.ja, be sure that you delete its corresponding binary in the jsloader/resources/gre subtree or under the jssubloader tree. Then modify the javascript file as usual.omni.ja just in case, syntax errors may stop Firefox from loading.zip -qr9XD omni.ja * in the same temporary directory. Be sure to delete the old omni.ja file before zipping, otherwise you may end up with a nested omni.ja. While I was playing with the file, after an initial smooth period where everything worked, I started getting segfaults even when simply unpacking, repacking, and loading omni.ja because I was neglecting to delete the old omni.ja, which created a jar that was nested in around 25 levels, which was too large for Firefox.omni.ja from the temporary directory to where you got it from. Give everyone read permissions (chmod a+r /usr/lib/firefox)--purgecaches command line parameterMOZ_PURGE_CACHES environment variable to 1.purgecaches fileomni.ja, Firefox should run on your new code.http://inpursuitoflaziness.blogspot.com/2014/01/editing-files-from-omnija-in-firefox-20.html
| Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |