diff --git a/src/www/js/wc.js b/src/www/js/wc.js index cbcb421d2..e0eeb4587 100644 --- a/src/www/js/wc.js +++ b/src/www/js/wc.js @@ -1,3 +1,6 @@ + +/* --- Wide Coverage Translation Demo web app ------------------------------- */ + var wc={} //wc.cnl="Phrasebook" // try this controlled natural language first wc.f=document.forms[0] @@ -11,12 +14,14 @@ wc.local=appLocalStorage("gf.wc.") wc.translating="" wc.delayed_translate=function() { - function restart(){ if(wc.f.input.value!=wc.translating) wc.translate() } + function restart(){ + if(wc.f.input.value!=wc.translating) wc.translate() + var h=wc.f.input.scrollHeight,bh=document.body.clientHeight + if(h>bh) h=bh + if(wc.f.input.clientHeightbh) h=bh - if(wc.f.input.clientHeight