morat, you are great!!!
I made some slight modifications and now it works like a charm ... A special thanks once more to you!
(The only thing which I could not properly resolve was an error in overlay.xul regarding the reference to overlay.dtd in
<toolbarbutton id="search-button" class="toolbarbutton-1" label="&SearchButton.label;" tooltiptext="&SearchButton.tooltiptext;" oncommand="goDoCommand('cmd_search');"/>
XML Parsing Error: undefined entity
but I replaced it by
<toolbarbutton id="search-button" class="toolbarbutton-1" label="Search" tooltiptext="Shortcut to 'Edit' -> 'Find' -> 'Search Messages'" oncommand="goDoCommand('cmd_search');"/>)
The following is the working code:
/SearchButton/manifest.json
Code: Select all
{
"manifest_version": 2,
"name": "SearchButton",
"description": "Toolbar button to invoke message search window.",
"version": "1.0",
"author": "morat & C-E",
"icons": {
"16": "skin/search.svg",
"24": "skin/search.svg",
"48": "skin/search.svg",
"96": "skin/search.svg"
},
"legacy": {
"type": "xul"
},
"applications": {
"gecko": {
"id": "SearchButton@pharqcon.com",
"strict_min_version": "68.0"
}
}
}
/SearchButton/chrome.manifest
Code: Select all
content SearchButton content/
locale SearchButton en-US locale/en_US/
skin SearchButton classic/1.0 skin/
overlay chrome://messenger/content/messenger.xul chrome://SearchButton/content/overlay.xul
style chrome://messenger/content/customizeToolbar.xul chrome://SearchButton/skin/overlay.css
/SearchButton/content/overlay.js
Code: Select all
var SearchButton = {
init: function () {
},
example: function () {
Services.prompt.alert(window, "SearchButton", document.location.href);
},
};
window.addEventListener("load", function () { SearchButton.init(); }, false);
/SearchButton/content/overlay.xul
Code: Select all
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://SearchButton/skin/overlay.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://SearchButton/locale/en_US/overlay.dtd">
<overlay id="tweaks-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://SearchButton/content/overlay.js"/>
<toolbarpalette id="MailToolbarPalette">
<toolbarbutton id="search-button" class="toolbarbutton-1" label="Search" tooltiptext="Shortcut to 'Edit' -> 'Find' -> 'Search Messages'" oncommand="goDoCommand('cmd_search');"/>
</toolbarpalette>
</overlay>
/SearchButton/skin/overlay.css
Code: Select all
#search-button {
list-style-image: url("chrome://SearchButton/skin/search.svg");
-moz-image-region: auto;
}
/SearchButton/skin/search.svg
http://pharqcon.bplaced.net/dl/search.svg
/SearchButton/locale\en_US/overlay.dtd
Code: Select all
<!ENTITY SearchButton.label "Search">
<!ENTITY SearchButton.tooltiptext "Shortcut to 'Edit' -> 'Find' -> 'Search Messages'">
If you want to try this extension, you can download the .xpi (packed into .zip) from here:
http://pharqcon.bplaced.net/dl/SearchButton.zip