Closed zuphilip closed 5 years ago
You're running zoteroocr.js again in the prefs window, which tries to set Zotero.OCR even though it already exists on the global Zotero
object provided by include.js. I'm not sure why that's resulting in this error, but you should be able to just drop the <script src="chrome://zoteroocr/content/zoteroocr.js"/>
line in preferences.xul.
Moreover, we maybe want to give some default values to the preferences as long as they are not set differently.
Example: https://github.com/jlegewie/zotfile/blob/master/defaults/preferences/defaults.js
Oh, yeah, that seems to work! Thank you very much! :bowing_man: Now, I only need to understand why it works. Is the following correct: The zoteroocr.js
is loaded on every start of Zotero because it is part of the overlay.xul
?
For the default values of the preferences: Is it enough to have such a file in that subfolder, i.e. is this called automatically by Zotero then?
Okay, I just tried and out and it seems that it is enough to simply add the preferences in a file in this directory.
The zoteroocr.js is loaded on every start of Zotero because it is part of the overlay.xul?
Yes, that's right.
Is it enough to have such a file in that subfolder, i.e. is this called automatically by Zotero then?
Yes.
Thank you very much @dstillman for the help and useful information!
This solves #9 and also give an simple option for indicating another language as in #8.
However, the current behavior is very strange: The first time one can click on the "Zotero OCR Preferences" in the Tools menu and everything works find. But one cannot open the preferences a second time, there is an error showing up
@dstillman: Have you any idea what this error message means exactly?
Moreover, we maybe want to give some default values to the preferences as long as they are not set differently. I have to check how this is usually done.