Remove (harmless) eval() calls in conditional-timed-textbox.xml (used for quicksearch on Fx3) to avoid AMO flagging
This commit is contained in:
parent
ba1b45b555
commit
034c2a1792
2 changed files with 8 additions and 29 deletions
|
@ -28,38 +28,20 @@
|
||||||
|
|
||||||
<binding id="conditional-timed-textbox" extends="chrome://global/content/bindings/textbox.xml#timed-textbox">
|
<binding id="conditional-timed-textbox" extends="chrome://global/content/bindings/textbox.xml#timed-textbox">
|
||||||
<implementation>
|
<implementation>
|
||||||
<field name="skipTimeout"/>
|
|
||||||
<field name="testcode"/>
|
|
||||||
<field name="onbeforefire"/>
|
|
||||||
<field name="onafterfire"/>
|
|
||||||
<field name="ontestfail"/>
|
|
||||||
|
|
||||||
<method name="_fireCommand">
|
<method name="_fireCommand">
|
||||||
<parameter name="me"/>
|
<parameter name="me"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if (me.skipTimeout) {
|
//
|
||||||
me.skipTimeout = false;
|
// This whole binding can be removed once Firefox 3.0 support is removed
|
||||||
return;
|
//
|
||||||
}
|
this._timer = null;
|
||||||
|
|
||||||
var code = me.getAttribute('testcode');
|
if (me.value.indexOf('"') != -1) {
|
||||||
if (!code.length) {
|
ZoteroPane.setItemsPaneMessage(Zotero.getString('advancedSearchMode'));
|
||||||
code = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (eval(code)) {
|
|
||||||
if (me.getAttribute('onbeforefire')) {
|
|
||||||
eval(me.getAttribute('onbeforefire'));
|
|
||||||
}
|
|
||||||
me._timer = null;
|
|
||||||
me.doCommand();
|
|
||||||
if (me.getAttribute('onafterfire')) {
|
|
||||||
eval(me.getAttribute('onafterfire'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
eval(me.getAttribute('ontestfail'));
|
me.doCommand();
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -243,10 +243,7 @@
|
||||||
<label id="zotero-tb-search-label" value="&zotero.toolbar.search.label;" control="zotero-tb-search" hidden="true"/>
|
<label id="zotero-tb-search-label" value="&zotero.toolbar.search.label;" control="zotero-tb-search" hidden="true"/>
|
||||||
<textbox id="zotero-tb-search" type="search" timeout="250" command="cmd_zotero_search" dir="reverse"
|
<textbox id="zotero-tb-search" type="search" timeout="250" command="cmd_zotero_search" dir="reverse"
|
||||||
onkeypress="ZoteroPane.handleSearchKeypress(this, event)"
|
onkeypress="ZoteroPane.handleSearchKeypress(this, event)"
|
||||||
oninput="ZoteroPane.handleSearchInput(this, event)"
|
oninput="ZoteroPane.handleSearchInput(this, event)">
|
||||||
testcode="me.value.indexOf('"') == -1"
|
|
||||||
prefire="ZoteroPane.clearItemsPaneMessage()"
|
|
||||||
ontestfail="ZoteroPane.setItemsPaneMessage(Zotero.getString('advancedSearchMode'))">
|
|
||||||
<toolbarbutton id="zotero-tb-search-cancel" oncommand="this.parentNode.value='';" hidden="true"/>
|
<toolbarbutton id="zotero-tb-search-cancel" oncommand="this.parentNode.value='';" hidden="true"/>
|
||||||
</textbox>
|
</textbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
Loading…
Reference in a new issue