Skip to content

Commit

Permalink
tesseract missing error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
GM-Script-Writer-62850 committed Jun 16, 2020
1 parent 89f7927 commit f68b199
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions res/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,15 @@ function changeBrightContrast(){// Webkit based only :(
previewIMG.style.webkitFilter='brightness('+(Number(document.scanning.bright.value)+100)+'%) contrast('+(Number(document.scanning.contrast.value)+100)+'%)';
}
function fileChange(type){
if(type=='txt')
getID('lang').removeAttribute('style');
if(type=='txt'){
if(document.scanning.lang.value==''){
document.scanning.filetype.children[3].disabled=true;
printMsg('Tesseract Error','Saving to Text File format requires tesseract, it may not be installed!','center',-1);
document.scanning.filetype.selectedIndex=0;
}
else
getID('lang').removeAttribute('style');
}
else
getID('lang').style.display='none';
}
Expand Down

0 comments on commit f68b199

Please sign in to comment.