prasmussen / chrome-cli

Control Google Chrome from the command line
MIT License
2.61k stars 89 forks source link

source command shows no output #80

Closed ahter closed 9 months ago

ahter commented 1 year ago

All other commands work as expected except source.

What could be the underlying reason for this? (so I can check my settings and setup etc?)

Thank you.

qzcsfchh commented 9 months ago

In my practice, execute command output noting as well, does it work for you?

prasmussen commented 9 months ago

source and execute works for me. Make sure to follow these instructions: https://github.com/prasmussen/chrome-cli?tab=readme-ov-file#javascript-execution-and-viewing-source

qzcsfchh commented 9 months ago

source and execute works for me. Make sure to follow these instructions: https://github.com/prasmussen/chrome-cli?tab=readme-ov-file#javascript-execution-and-viewing-source

Thanks for replying, I've tried to turn on View > Developer > Allow JavaScript from Apple Events, and now I got expected output for source command, but execute still display empty result: image

don't know what went wrong.

prasmussen commented 9 months ago

That example in the readme is meant to be run on the hackernews site. This example should work on any site: '(() => { return "foo" })()'

qzcsfchh commented 9 months ago

That example in the readme is meant to be run on the hackernews site. This example should work on any site: '(() => { return "foo" })()'

My bad, problem solved o( ̄▽ ̄)d