console is not defined in make-it-red plugin

23 views
Skip to first unread message

le zhang

unread,
Aug 24, 2023, 7:48:01 PMAug 24
to zotero-dev
Hi developers, 

I succeeded in printing out the Zotero.debug log to a file with this start command: 

> $zotero_path" -ZoteroDebugText -jsconsole -debugger -purgecaches  &>./zotero-debug.txt

But I cannot find the log in the browser console, while this line(resource://zotero/reader/pdf/web/viewer.js) can do that: 

>     console.log(`PDF ${pdfDocument.fingerprints[0]} [${info.PDFFormatVersion} ` + `${(info.Producer || "-").trim()} / ${(info.Creator || "-").trim()}] ` + `(PDF.js: ${_pdfjsLib.version || "?"} [${_pdfjsLib.build || "?"}])`);

I modified the `Zotero.debug` to `console.log` in the make-it-red plugin, and an error occurred: 

> console is not defined 

How can I print out the log in the browser console?

Thanks!

volatile static

unread,
Aug 24, 2023, 8:15:35 PMAug 24
to zotero-dev
Hi,
Try `window.console.log()`.
regards,

Message has been deleted

le zhang

unread,
Aug 24, 2023, 11:21:52 PMAug 24
to zotero-dev
I know what you mean now. Thanks! 

On Friday, August 25, 2023 at 11:10:45 AM UTC+8 le zhang wrote:
Either Window nor window is also not defined. 
Reply all
Reply to author
Forward
0 new messages