3 Copyright (c) 2008,2009 Tobias Sarnowski <sarnowski@new-thoughts.org>
5 Permission to use, copy, modify, and distribute this software for any
6 purpose with or without fee is hereby granted, provided that the above
7 copyright notice and this permission notice appear in all copies.
9 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 <?xml-stylesheet href=
"chrome://fireman/skin/FireManSidebar.css" type=
"text/css"?>
20 <!DOCTYPE overlay SYSTEM
"chrome://fireman/locale/FireManSidebar.dtd">
21 <overlay id=
"FireManSidebarOverlay"
22 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
24 <!-- our manu entry -->
25 <menupopup id=
"viewSidebarMenu">
26 <menuitem key=
"key_openFireManSidebar"
27 observes=
"viewFireManSidebar" />
30 <!-- our toolbar button -->
31 <toolbarpalette id=
"BrowserToolbarPalette">
32 <toolbarbutton id=
"FireManButton"
33 class=
"toolbarbutton-1"
34 label=
"&FireManSidebar.title;"
35 tooltiptext=
"&FireManSidebar.title;"
36 oncommand=
"toggleSidebar('viewFireManSidebar');" />
40 <keyset id=
"mainKeyset">
41 <key id=
"key_openFireManSidebar"
42 command=
"viewFireManSidebar"
43 key=
"&openFireManSidebar.commandkey;"
44 modifiers=
"&openFireManSidebar.modifierskey;" />
47 <broadcasterset id=
"mainBroadcasterSet">
48 <broadcaster id=
"viewFireManSidebar"
49 label=
"&FireManSidebar.title;"
53 sidebarurl=
"chrome://fireman/content/FireManSidebar.xul"
54 sidebartitle=
"&FireManSidebar.title;"
55 oncommand=
"toggleSidebar('viewFireManSidebar');" />
59 <script type=
"application/x-javascript">
60 /* disabled atm because the first line
"document.getElementById" breaks firefox... o.O
62 var FM_firefoxnav = document.getElementById(
"nav-bar");
63 var FM_curSet = FM_firefoxnav.currentSet;
64 if (FM_curSet.indexOf(
"FireManButton") == -
1)
67 // Place the button before the search bar
68 if (FM_curSet.indexOf(
"search-container") != -
1) {
69 FM_set = curSet.replace(/search-container/,
"FireManButton,search-container");
70 } else { // at the end
71 FM_set = FM_curSet +
",FireManButton";
73 FM_firefoxnav.setAttribute(
"currentset", FM_set);
74 FM_firefoxnav.currentSet = FM_set;
75 document.persist(
"nav-bar",
"currentset");
76 // If you don't do the following call, funny things happen
78 BrowserToolboxCustomizeDone(true);
80 catch (e) { alert(
"#" + e); }
83 catch(e) { alert(e); }