From: Damyan Ivanov Date: Thu, 26 Feb 2009 10:53:33 +0000 (+0200) Subject: initial import of custom toolbar button template X-Git-Tag: 0.2~12 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=0e07f53e79d4d4f21e86d5b3a98816d88e155ff0;p=icedeb.git initial import of custom toolbar button template --- 0e07f53e79d4d4f21e86d5b3a98816d88e155ff0 diff --git a/build b/build new file mode 100644 index 0000000..687488d --- /dev/null +++ b/build @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e +set -u + +export PKG=custom-toolbar-button@example.com + +[ ! -e $PKG.xpi ] || rm $PKG.xpi + +jar -v -M -c -f $PKG.xpi chrome install* chrome.manifest diff --git a/chrome.manifest b/chrome.manifest new file mode 100644 index 0000000..fbf3dc4 --- /dev/null +++ b/chrome.manifest @@ -0,0 +1,5 @@ +content custombutton chrome/ +style chrome://global/content/customizeToolbar.xul chrome://custombutton/content/button.css + +# Firefox +overlay chrome://browser/content/browser.xul chrome://custombutton/content/button.xul diff --git a/chrome/button-1.png b/chrome/button-1.png new file mode 100644 index 0000000..9f77b37 Binary files /dev/null and b/chrome/button-1.png differ diff --git a/chrome/button.css b/chrome/button.css new file mode 100644 index 0000000..ce1ccc1 --- /dev/null +++ b/chrome/button.css @@ -0,0 +1,17 @@ +#custom-button-1, +#wrapper-custom-button-1 +{list-style-image: url("chrome://custombutton/content/button-1.png");} + +/* common style for all custom buttons */ +.custombutton +{-moz-image-region: rect( 0px 24px 24px 0px);} + +.custombutton:hover +{-moz-image-region: rect(24px 24px 48px 0px);} + +[iconsize="small"] .custombutton +{-moz-image-region: rect( 0px 40px 16px 24px);} + +[iconsize="small"] .custombutton:hover +{-moz-image-region: rect(24px 40px 40px 24px);} + diff --git a/chrome/button.js b/chrome/button.js new file mode 100644 index 0000000..f1ec859 --- /dev/null +++ b/chrome/button.js @@ -0,0 +1,8 @@ +CustomButton = { + +1: function () { + alert("Just testing") + }, + +} + diff --git a/chrome/button.xul b/chrome/button.xul new file mode 100644 index 0000000..46e14e1 --- /dev/null +++ b/chrome/button.xul @@ -0,0 +1,27 @@ + + + + + + +