An inject tools for injecting js code into electron application
Please follow DMCA when using this code
- unpack
node_modules.asarpackage (in./resources) - write
hook.jsintoravenpackage directory (raven will be required at the early stage of startup in some application) - modify
index.jsofraven,injecting require ofhook.js
Currently using embedded javascript file (
hooklog.js)
- modify
hook.jsif you need, or enableno_embedfeature to use specified js at (NO_EMBED_HOOK_JS_PATH) - use
cargo buildto make executable with embedded js, orcargo build --features no_embedwithout embedded js - Move the program to the electron application directory
- run
- Windows / Typora 1.9.5 PASSED
- Ubuntu / Typora 1.9.3 PASSED
Since macos may adopt different packaging methods and webkit as the execution environment, this tool does not support applications under macos.
https://github.com/DiamondHunters/NodeInject_Hook_example :Use NodeInject with Typora
First airdrop of my life. Let me taste the flavor of web3.