Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Commit

Permalink
add toolbar button
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyo Nagashima committed Apr 8, 2009
1 parent e022e44 commit 500bbae
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 2 additions & 0 deletions chrome.manifest
@@ -1,3 +1,5 @@
content context-style-switcher content/

overlay chrome://browser/content/browser.xul chrome://context-style-switcher/content/overlay.xul

skin context-style-switcher classic/1.0 skin/
28 changes: 26 additions & 2 deletions content/overlay.xul
Expand Up @@ -8,12 +8,36 @@
<script type="application/x-javascript"
src="chrome://context-style-switcher/content/overlay.js"/>

<toolbarpalette id="BrowserToolbarPalette">
<!-- begin: copy from Mozilla Firefox src -->
<toolbarbutton id="context-style-switcher-button"
label="&pageStyleMenu.label;"
image="chrome://context-style-switcher/skin/toolbarbutton_icon.png"
type="menu">
<menupopup onpopupshowing="stylesheetFillPopup(this);"
oncommand="stylesheetSwitchAll(window._content, event.target.getAttribute('data')); setStyleDisabled(false);">
<menuitem label="&pageStyleNoStyle.label;"
accesskey="&pageStyleNoStyle.accesskey;"
oncommand="setStyleDisabled(true); event.stopPropagation();"
type="radio"/>

<menuitem label="&pageStylePersistentOnly.label;"
accesskey="&pageStylePersistentOnly.accesskey;"
type="radio"
checked="true"/>

<menuseparator/>
</menupopup>
</toolbarbutton>
<!-- end: copy from Mozilla Firefox src -->
</toolbarpalette>

<popup id="contentAreaContextMenu">
<menuseparator id="context-style-switcher_sep"
<menuseparator id="context-sep-context-style-switcher"
insertbefore="context-sep-properties"/>

<!-- begin: copy from Mozilla Firefox src -->
<menu id="context-style-switcher_menu"
<menu id="context-context-style-switcher"
label="&pageStyleMenu.label;"
accesskey="&pageStyleMenu.accesskey;"
insertbefore="context-sep-properties">
Expand Down
Binary file added skin/toolbarbutton_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 500bbae

Please sign in to comment.