www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 034c2a1792c8bdca0ac96212f401d2fc533d86d7
parent ba1b45b5554dd2c248e5b1fd39cc6ec13fc9a8a3
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 13 Nov 2009 06:08:28 +0000

Remove (harmless) eval() calls in conditional-timed-textbox.xml (used for quicksearch on Fx3) to avoid AMO flagging


Diffstat:
Mchrome/content/zotero/bindings/conditional-timed-textbox.xml | 32+++++++-------------------------
Mchrome/content/zotero/overlay.xul | 5+----
2 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/chrome/content/zotero/bindings/conditional-timed-textbox.xml b/chrome/content/zotero/bindings/conditional-timed-textbox.xml @@ -28,38 +28,20 @@ <binding id="conditional-timed-textbox" extends="chrome://global/content/bindings/textbox.xml#timed-textbox"> <implementation> - <field name="skipTimeout"/> - <field name="testcode"/> - <field name="onbeforefire"/> - <field name="onafterfire"/> - <field name="ontestfail"/> - <method name="_fireCommand"> <parameter name="me"/> <body> <![CDATA[ - if (me.skipTimeout) { - me.skipTimeout = false; - return; - } + // + // This whole binding can be removed once Firefox 3.0 support is removed + // + this._timer = null; - var code = me.getAttribute('testcode'); - if (!code.length) { - 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')); - } + if (me.value.indexOf('"') != -1) { + ZoteroPane.setItemsPaneMessage(Zotero.getString('advancedSearchMode')); } else { - eval(me.getAttribute('ontestfail')); + me.doCommand(); } ]]> </body> diff --git a/chrome/content/zotero/overlay.xul b/chrome/content/zotero/overlay.xul @@ -243,10 +243,7 @@ <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" onkeypress="ZoteroPane.handleSearchKeypress(this, event)" - oninput="ZoteroPane.handleSearchInput(this, event)" - testcode="me.value.indexOf('&quot;') == -1" - prefire="ZoteroPane.clearItemsPaneMessage()" - ontestfail="ZoteroPane.setItemsPaneMessage(Zotero.getString('advancedSearchMode'))"> + oninput="ZoteroPane.handleSearchInput(this, event)"> <toolbarbutton id="zotero-tb-search-cancel" oncommand="this.parentNode.value='';" hidden="true"/> </textbox> </hbox>