diff chrome/content/tinyurl_overlay.xul @ 0:c14d52a3b2fe

initial import
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 11 Aug 2008 20:34:21 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/chrome/content/tinyurl_overlay.xul	Mon Aug 11 20:34:21 2008 +0900
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+
+<overlay id="tinyurl"
+    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+	
+	<script type="application/x-javascript" src="chrome://tinyurl/content/tinyurl.js"></script>
+	<script type="application/x-javascript" src="chrome://tinyurl/content/saved.js"></script>
+	<script language="JavaScript">
+		//Window Event Handers
+		try{window.addEventListener("load", tinyurl_overlayInit, true);}catch(e){}
+	</script>
+	
+	
+	<!-- Firefox Toolbar Icon -->
+	<toolbarpalette id="BrowserToolbarPalette">
+		<toolbarbutton type="menu" label="TinyUrl"
+				id="tinyurl-button" tooltiptext="Tiny Url Creator"
+				image="chrome://tinyurl/content/icons/button.png">
+			<menupopup>
+				<menuitem label="New..."
+						oncommand="window.openDialog('chrome://tinyurl/content/tinyurl_dialog.xul','TinyUrlDialog','centerscreen, chrome, resizable').focus();"
+						accesskey="N" 
+						style="font-weight: bold;" />
+				<menuitem label="From Current URL"
+						oncommand="tinyurl_createFromCurrent();"
+						accesskey="C" />
+				<menuitem label="View Saved"
+						oncommand="window.openDialog('chrome://tinyurl/content/tinyurl_dialog.xul','TinyUrlDialog','centerscreen, chrome, resizable', 'saved').focus();"
+						accesskey="S" />
+				<menuitem label="Options..."
+						oncommand="window.openDialog('chrome://tinyurl/content/dialogs/options.xul','TinyUrlOptions','centerscreen, chrome, resizable').focus();"
+						accesskey="O" />
+			</menupopup>			
+		</toolbarbutton>
+	</toolbarpalette>
+	
+	<!-- Firefox Tools File Menu -->
+	<menupopup id="menu_ToolsPopup">
+		<menu id="tinyurl-tools-menu" label="TinyUrl Creator" 
+				accesskey="T" class="menuitem-iconic"
+				insertafter="devToolsSeparator">	
+			<menupopup>
+				<menuitem label="New..."
+						oncommand="window.openDialog('chrome://tinyurl/content/tinyurl_dialog.xul','TinyUrlDialog','centerscreen, chrome, resizable').focus();"
+						accesskey="N" />
+				<menuitem label="From Current URL"
+						oncommand="tinyurl_createFromCurrent();"
+						accesskey="C" />
+				<menuitem label="View Saved"
+						oncommand="window.openDialog('chrome://tinyurl/content/tinyurl_dialog.xul','TinyUrlDialog','centerscreen, chrome, resizable', 'saved').focus();"
+						accesskey="S" />
+				<menuitem label="Options..."
+						oncommand="window.openDialog('chrome://tinyurl/content/dialogs/options.xul','TinyUrlOptions','centerscreen, chrome, resizable').focus();"
+						accesskey="O" />
+			</menupopup>
+		</menu>
+	</menupopup>
+
+	<!-- Mozilla Tools File Menu -->
+	<menupopup id="taskPopup">
+        <menu id="tinyurl-moz-menu" label="TinyURL Creator" accesskey="T" insertafter="devToolsSeparator">
+			<menupopup>
+				<menuitem label="New..."
+						oncommand="window.openDialog('chrome://tinyurl/content/tinyurl_dialog.xul','TinyUrlDialog','centerscreen, chrome, resizable').focus();"
+						accesskey="N" />
+				<menuitem label="From Current URL"
+						oncommand="tinyurl_createFromCurrent();"
+						accesskey="C" />
+				<menuitem label="View Saved"
+						oncommand="window.openDialog('chrome://tinyurl/content/tinyurl_dialog.xul','TinyUrlDialog','centerscreen, chrome, resizable', 'saved').focus();"
+						accesskey="S" />
+				<menuitem label="Options..."
+						oncommand="window.openDialog('chrome://tinyurl/content/dialogs/options.xul','TinyUrlOptions','centerscreen, chrome, resizable').focus();"
+						accesskey="O" />
+			</menupopup>
+		</menu>
+	</menupopup>
+	
+	
+	<!-- Context Menu -->
+	<popup id="contentAreaContextMenu">
+		<menuitem id="tinyurl-context-link-menu" label="Create TinyUrl for this Link" oncommand="tinyurl_createFromAnchor(this);" insertafter="context-openlinkintab" collapsed="false" />
+		<menuitem id="tinyurl-context-page-menu" label="Create TinyUrl for this Page" oncommand="tinyurl_createFromCurrent();" insertafter="tinyurl-context-link-menu, context-savepage" />
+	</popup>
+</overlay>
\ No newline at end of file