2
|
1 var prefs = {
|
|
2
|
|
3 nightly: null,
|
|
4
|
|
5 init: function()
|
|
6 {
|
|
7 var mediator = Components.classes['@mozilla.org/appshell/window-mediator;1']
|
|
8 .getService(Components.interfaces.nsIWindowMediator);
|
|
9
|
|
10 var window = mediator.getMostRecentWindow("navigator:browser");
|
|
11 if (!window)
|
|
12 window=mediator.getMostRecentWindow("mail:3pane");
|
|
13 if (!window)
|
|
14 window=mediator.getMostRecentWindow("calendarMainWindow");
|
|
15 if (!window)
|
|
16 window=mediator.getMostRecentWindow("Songbird:Main");
|
|
17 if (window)
|
|
18 prefs.nightly=window.nightly;
|
|
19 }
|
|
20 }
|
|
21
|
|
22 window.addEventListener("load",prefs.init,false);
|