Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

לאתר זה תהיה פונקציונליות מוגבלת בזמן שאנו מתחזקים אותו לשיפור החוויה שלך. אם מאמר מסויים לא פותר את הבעיה שלך וברצונך לשאול שאלה, קהילת התמיכה שלנו מחכה לעזור לך ב־Twitter תחת ‎@FirefoxSupport וב־Reddit תחת ‎/r/firefox.

חיפוש בתמיכה

יש להימנע מהונאות תמיכה. לעולם לא נבקש ממך להתקשר או לשלוח הודעת טקסט למספר טלפון או לשתף מידע אישי. נא לדווח על כל פעילות חשודה באמצעות באפשרות ״דיווח על שימוש לרעה״.

מידע נוסף

How do I customize the error pages in Firefox 24?

  • 6 תגובות
  • 8 have this problem
  • 1 view
  • תגובה אחרונה מאת ekan

more options

I'd like to customize the HTLM/CSS/JavaScript of all the Firefox 24 error pages, i.e. the network connectivity lost, DNS and other standard error pages.

I'd like to customize the HTLM/CSS/JavaScript of all the Firefox 24 error pages, i.e. the network connectivity lost, DNS and other standard error pages.

פתרון נבחר

There are two omni.ja files in Firefox 24 on Ubuntu 12.04: /usr/lib/firefox/omni.ja /usr/lib/firefox/browser/omni.ja

Unzip the first file into it's own directory. Then you can edit: omni.ja/chrome/toolkit/content/global/netError.xhtml

Read this answer in context 👍 3

כל התגובות (6)

more options

Hello ekan,

This can be done, but you're going to need to get pretty dirty to get it done. Ready?

First, learn about userContent.css: http://kb.mozillazine.org/UserContent.css http://kb.mozillazine.org/Profile_folder

Now, the easiest way to learn about the elements on the error page is to go to the source. So, go to the chrome folder in the Firefox program folder, usually C:\Program Files\Mozilla Firefox\chrome in Windows Explorer. Find the file called classic.jar and copy that somewhere else. Rename classic.jar to a .zip file and extract it, preferably to a folder called classic at whatever location you are at. Then, open the classic folder and navigate to ...\classic\skin\classic\global and find the file called netError.css.

Open the netError.css file in Wordpad (Notepad doesn't seem to work for me because then the lines all run together). See all the code that starts with the # symbol? Those are the things you can easily change. Copy all the #ELEMENT code into your userContent.css file.

Now you can start making changes to see what you like. I would make small changes at a time to see if it works the way you want. After each change, you need to close and restart Fx. Here's one to get you going:

CODE: SELECT ALL

  1. errorPageContainer {
 -moz-border-radius: 0px !important;
 background-color: red !important;

}

That should make the box that surrounds the error message be red with square corners instead of white with a rounded corner border. Remember that before every semi-colon, you need to put !important or the change won't do anything.

more options

I don't think that this is possible. You probably would have to create an extension to replace the current files.

  • view-source:chrome://global/content/netError.xhtml
  • view-source:chrome://global/skin/netError.css
  • view-source:chrome://global/locale/netError.dtd
more options

classic.jar doesn't exist in Ubuntu 12.04 Linux, as far as I can find. /usr/lib/firefox/browser/omni.ja does exist, but there's no netError.css in it anywhere...

more options

It used to be possible in previous Firefox versions by editing the netError.xhtml file, which was located in the compressed omni.ja in chrome/toolkit/content/global

more options

פתרון נבחר

There are two omni.ja files in Firefox 24 on Ubuntu 12.04: /usr/lib/firefox/omni.ja /usr/lib/firefox/browser/omni.ja

Unzip the first file into it's own directory. Then you can edit: omni.ja/chrome/toolkit/content/global/netError.xhtml

more options

Note that you know have to re-zip omni.ja using this command (thanks mozian!): zip -qr9XD omni.ja *