Writing Extension Preferences UI for Firefox 1.1
-
- Posts: 33
- Joined: December 5th, 2004, 2:05 pm
- Contact:
-
- Posts: 337
- Joined: November 5th, 2002, 2:34 am
- Location: France
- Contact:
In AiO, I have a file with the following code:
It overlays chrome://browser/content/pref/pref-advanced.xul. The purpose is to grey out the autoscrolling pref in Firefox options since autoscrolling preferences must be set in AiO options.
Whether or not this is a good idea is not relevant here.
This doesn't work anymore in Deer Park due to the preferences UI rewrite. I tried 2 things:
1. Overlay chrome://browser/content/preferences/preferences.xul with the same code. I receive the JS error: document.getElementById("useAutoScrolling") has no properties, which may be normal because "useAutoScrolling" is defined in the "advanced prefpane".
2. I tried to overlay the "advanced prefpane" chrome://browser/content/preferences/advanced.xul, still with the same file: Boum!! Firefox crashes as soon I select Tools->Options...
Asqueella, Cusser, Ben ... you are much smarter than me on this topic. Any idea ??
Code: Select all
<?xml version="1.0"?>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"><![CDATA[
document.getElementById("useAutoScrolling").setAttribute("disabled", "true");
]]></script>
</overlay>
It overlays chrome://browser/content/pref/pref-advanced.xul. The purpose is to grey out the autoscrolling pref in Firefox options since autoscrolling preferences must be set in AiO options.
Whether or not this is a good idea is not relevant here.
This doesn't work anymore in Deer Park due to the preferences UI rewrite. I tried 2 things:
1. Overlay chrome://browser/content/preferences/preferences.xul with the same code. I receive the JS error: document.getElementById("useAutoScrolling") has no properties, which may be normal because "useAutoScrolling" is defined in the "advanced prefpane".
2. I tried to overlay the "advanced prefpane" chrome://browser/content/preferences/advanced.xul, still with the same file: Boum!! Firefox crashes as soon I select Tools->Options...
Asqueella, Cusser, Ben ... you are much smarter than me on this topic. Any idea ??
Marc
- Mossop
- Posts: 717
- Joined: January 11th, 2004, 7:24 am
- Location: Swansea, UK
mboullet wrote:I tried to overlay the "advanced prefpane" chrome://browser/content/preferences/advanced.xul, still with the same file: Boum!! Firefox crashes as soon I select Tools->Options...
Asqueella, Cusser, Ben ... you are much smarter than me on this topic. Any idea ??
Bug 283949
- BenBasson
- Moderator
- Posts: 13671
- Joined: February 13th, 2004, 5:49 am
- Location: London, UK
- Contact:
-
- Posts: 4864
- Joined: October 16th, 2003, 5:47 am
- Location: Somewhere in London, riding the Underground
- alanjstr
- Moderator
- Posts: 9100
- Joined: November 5th, 2002, 4:43 pm
- Location: Anywhere but here
- Contact:
has all of this stuff been posted on http://kb.mozillazine.org/Dev_:_Extensions ? If so, I'll add it to the FAQ
Former UMO Admin, Former MozillaZine General Mod
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files
-
- Posts: 4019
- Joined: November 16th, 2003, 3:05 am
- Location: Russia, Moscow
- BenBasson
- Moderator
- Posts: 13671
- Joined: February 13th, 2004, 5:49 am
- Location: London, UK
- Contact:
-
- Posts: 30
- Joined: June 23rd, 2004, 8:03 pm
The onpreferenceread and onpreferencewrite attributes have been renamed to onsyncfrompreference and onsynctopreference. (you can read about it at Preferences System:New attributes)
I was quite confused for a while as to why my script was suddenly being completely ignored. Is there a comprehensive list of changes somewhere between Deer Park Alpha 1 and 2?
I was quite confused for a while as to why my script was suddenly being completely ignored. Is there a comprehensive list of changes somewhere between Deer Park Alpha 1 and 2?
- BenBasson
- Moderator
- Posts: 13671
- Joined: February 13th, 2004, 5:49 am
- Location: London, UK
- Contact: