Thanks a lot it worked well... :)
On Mon, Nov 17, 2008 at 8:46 PM, Silver Surfer
<[EMAIL PROTECTED]>wrote:
> I don't know it'll exactly work but give a try.
>
> Use a preference variable to identify the first launch of browser and let
> say you have initialized it to true for identifying the first launch.
> You have to specify about the preference variable in another js file. If
> you don't know about it, search it in mozilladev.org site.
> In overlay.xul, add this script for run the sidebar toggling function on
> browser loading. <script type="application/x-javascript">
> <![CDATA[
>
> window.addEventListener("load", initFun, false);
> function initFun(){
>
> //Get the preference value
> var prefs = Components.classes["@mozilla.org/preferences-service;1
> "].
> getService(Components.interfaces.nsIPrefService);
> prefs = prefs.getBranch("extensions.yourextensionname.");
>
> var isFirstLaunch = prefs.getCharPref("firstLaunch");
>
> if(isFirstLaunch == true){
> toggleSidebar('idOfYourSidebarOrBroadcaster');
> }
>
> prefs.setCharPref("firstLaunch", gContextMenu.imageURL);// set
> preference to false
>
>
> }
>
>
> ]]>
> </script>
>
> I didn't test it. But I think it should work.
> On Mon, Nov 17, 2008 at 3:27 PM, manish deora <
> [EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> i have a query, i have created a sampe firefox sidebar but i want it open
>> by default first time after installing it.so how can i capture the firefox
>> load event and where should i specify this.
>>
>> expecting a reply soon.
>> --
>> Regards,
>> Manish Deora
>>
>> _______________________________________________
>> Project_owners mailing list
>> [email protected]
>> https://www.mozdev.org/mailman/listinfo/project_owners
>>
>>
>
>
> --
> ~Silver Surfer~
> Surfing through time & space
> http://risingofsilversurfer.blogspot.com/
>
> _______________________________________________
> Project_owners mailing list
> [email protected]
> https://www.mozdev.org/mailman/listinfo/project_owners
>
>
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners