tmp=function(){var b=Core.string.endsWith;var a="disabled";var c=Core.log.getLogger("DictionaryCL");var d={name:"xDictionaryCL",title:"TITLE",icon:"ABC",activate:function(){Core.log.getLogger("DictionaryCL").trace("-->");var i=d.options.xdictionary;if(i===a){Core.ui.showMsg(["WARN_DICT_DISABLED"]);}else{var h=Core.config.userDictionaryPath+i;if(FileSystem.getFileInfo(h)){var f=Core.config.addonsPath+"xDictionaryCL/";var g={log:Core.log.getLogger("DictionaryCL"),rootPath:f,Core:Core,xdictPath:h,resultSize:d.options.resultSize,maxSmartZoom:d.options.maxSmartZoom};kbook.autoRunRoot.xdictionaryParams=g;kbook.autoRunRoot.path=f+"kb.xml";kbook.autoRunRoot.enterIf(kbook.model);}else{Core.ui.showMsg(["WARN_DICT_DOESNT_EXIST"]);}}},actions:[{name:"launchxDictionary",title:"ACTION_DICTIONARY",group:"Utils",icon:"ABC",action:function(){d.activate();}}],optionDefs:[{name:"xdictionary",title:"OPTION_DICTIONARY",icon:"ABC",defaultValue:a,values:[a],valueTitles:{disabled:"VALUE_DISABLED"}},{name:"resultSize",title:"Results size",icon:"ABC",defaultValue:25,values:[15,20,25,30,35],valueTitles:{15:"15",20:"20",25:"25",30:"30",35:"35"}},{name:"maxSmartZoom",title:"Max smart zoom",icon:"ABC",defaultValue:20,values:[0,10,20,25,40,50],valueTitles:{0:"Disabled",10:"10 %",20:"20 %",25:"25 %",40:"40 %",50:"50 %"}}],onPreInit:function(){this.root=Core.config.userDictionaryPath;if(!FileSystem.getFileInfo(this.root)){return;}var g=new FileSystem.Iterator(this.root);try{var h,i;var f=this.optionDefs[0];while(h=g.getNext()){if(h.type=="file"){i=h.path;if(b(i,".dic")){f.values.push(i);f.valueTitles[i]=i;}}}}finally{g.close();}}};Core.addAddon(d);};try{tmp();}catch(e){log.error("in xDictionary by Clementseken & Lisak",e);}