Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sidebar with normal page behaviour

12 views
Skip to first unread message

indiwa

unread,
Nov 17, 2006, 2:42:37 AM11/17/06
to
Hello,

I developed a simple new sidebar, which does nothing more than show a
certain URL.
The main reason is to access a page with intranet links in the sidebar
and open this through a keyboard shortcut.
But if I control-click on links in that sidebar for opening new tabs,
the content is displayed in the current tab. And a right click doesn't
show any context menu.
If I open the Page through a bookmark with the setting "open in
sidebar" all works fine, but I cannot access this link through a
keyboard-shortcut.

Here is my main extension code:

<overlay id="indiwaSidebar"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<menupopup id="viewSidebarMenu">
<menuitem key="key_openindiwaSidebar" observes="viewindiwaSidebar"
/>
</menupopup>

<keyset id="mainKeyset">
<key id="key_openindiwaSidebar" command="viewindiwaSidebar"
keycode="VK_F4" modifiers="" />
</keyset>

<broadcasterset id="mainBroadcasterSet">
<broadcaster id="viewindiwaSidebar"
label="indiwa Sidebar"
autoCheck="false"
type="checkbox"
group="sidebar"
sidebarurl="http://my.intranet.url"
sidebartitle="indiwa Sidebar"
oncommand="toggleSidebar('viewindiwaSidebar');" />
</broadcasterset>
</overlay>

How can I make this Sidebar work like a normal Page, with Ctrl-Click
for new Tabs and Right-Click for Context Menu?

gmgj

unread,
Nov 17, 2006, 4:25:30 PM11/17/06
to
its been a while, but, I believe what I did was put the file with the
links in an HTML file, and included it like this.


<iframe id="gj53run-sidebar-iframe" flex="1"
src="chrome://gj53run/content/CookBook/MySidebar.htm"/>


example xul file
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://gj53run/skin/gj53run.css"
type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://gj53run/locale/gj53run.dtd">

<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
id="gj53run-ShowMenu-sidebar"
onload="gj53runSidebarMenuOnload()"
onunload="gj53runSidebarMenuOnUnload()">

<script type="application/x-javascript"
src="chrome://gj53run/content/utilsxul.js"/>
<script type="application/x-javascript"
src="chrome://gj53run/content/gj53runMenuXUL.js"/>

<iframe id="gj53run-sidebar-iframe" flex="1"
src="chrome://gj53run/content/CookBook/MySidebar.htm"/>

</window>


Then something like this in your overlay will work
<broadcaster id="gj53run-xxh-sidebar"
autoCheck="false"
label="&gj53run.menuitem.SFT2.label;"
type="checkbox" group="sidebar"
sidebarurl="chrome://gj53run/content/xxxx.xul"

oncommand="toggleSidebar('gj53run-xxxxx-sidebar');"/>

If you follow the links from www.cookdotcom.com you can download my
alpha extension.
There is a working example their, it the main menu

0 new messages