nsBrowserContentHandler.js is gibberish
I'd like to modify some lines in nsBrowserContentHandler.js.
I've extracted omni.ja. JS files in "omni\jsloader\resource\app\components" are gibberish (using Notepad++). I have no problem opening JS files in omni\chrome\browser\content\browser.
Any idea?
Thank you.
Όλες οι απαντήσεις (4)
It is likely that the files in jsloader are compressed and can't be viewed directly.
Did you try to access the file via the components folder?
Maybe create an extension to overlay this function with a modified version.
- resource:///components/nsBrowserContentHandler.js
Note that it isn't recommended to make changes to files in an omni.ja archive.
Thank you cor-el. You're brilliant.
I've opened nsBrowserContentHandler.js in "omni\components".
I want to allow external links to open in a private window. I've changed the following lines:
var allowPrivate = forcePrivate || PrivateBrowsingUtils.permanentPrivateBrowsing; var navWin = RecentWindow.getMostRecentBrowserWindow({private: allowPrivate});
to:
// var allowPrivate = forcePrivate || PrivateBrowsingUtils.permanentPrivateBrowsing;
var navWin = RecentWindow.getMostRecentBrowserWindow({private: true});
After zipping the files and replacing omni.ja, I don't get what I want. I guess I have to modify the file in "omni\jsloader\resource\app\components" as well. How do I do that?
Do you see the modified file with the resource:// link?
- resource:///components/nsBrowserContentHandler.js
Yes, I do see it.
Thanks again.