Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Learn More

nsBrowserContentHandler.js is gibberish

  • 4 odpovede
  • 1 má tento problém
  • 8 zobrazení
  • Posledná odpoveď od Yaron

more options

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.

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.

Všetky odpovede (4)

more options

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.

more options

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?

more options

Do you see the modified file with the resource:// link?

  • resource:///components/nsBrowserContentHandler.js
more options

Yes, I do see it.

Thanks again.