home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
AIMP2
/
aimp_2.61.583.exe
/
$TEMP
/
YandexPackSetup.msi
/
filC9B603045C16BD1AB4243133B5E3F7D2
< prev
next >
Wrap
Extensible Markup Language
|
2010-07-12
|
2KB
|
42 lines
<?xml version="1.0"?>
<!DOCTYPE bindings [
<!ENTITY % yasearchDTD SYSTEM "chrome://yasearch/locale/yasearch.dtd" >
%yasearchDTD;
]>
<bindings id="YaSearchPartnerBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="extend-partner-toolbaritem">
<implementation>
<field name="_isInited">null</field>
<constructor><![CDATA[
if (this._isInited || this.childNodes.length)
return;
this._isInited = true;
const yaPartner = Components.classes["@yandex.ru/yasearch;1"]
.getService(Components.interfaces.nsIYaSearch)
.wrappedJSObject
.yaPartner;
var toolbaritemContent = yaPartner ? yaPartner.toolbaritemContent(this.ownerDocument) : null;
if (!toolbaritemContent) {
if (this.parentNode)
this.parentNode.removeChild(this);
return;
}
["title", "label", "image"].forEach(function(aAttrName) {
if (toolbaritemContent.hasAttribute(aAttrName))
this.setAttribute(aAttrName, toolbaritemContent.getAttribute(aAttrName));
}, this)
while (toolbaritemContent.firstChild)
this.appendChild(toolbaritemContent.firstChild);
]]></constructor>
</implementation>
</binding>
</bindings>