Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

How do I customize the error pages in Firefox 24?

  • 6 답장
  • 8 이 문제를 만남
  • 1 보기
  • 최종 답변자: 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

문맥에 따라 이 답변을 읽어주세요 👍 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 *