{"id":13697887,"url":"https://github.com/tintinweb/electron-inject","last_synced_at":"2025-04-04T17:11:03.239Z","repository":{"id":45958064,"uuid":"86372182","full_name":"tintinweb/electron-inject","owner":"tintinweb","description":"Inject javascript into closed source electron applications e.g. to enable developer tools for debugging.","archived":false,"fork":false,"pushed_at":"2023-09-22T17:48:20.000Z","size":23,"stargazers_count":347,"open_issues_count":5,"forks_count":37,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T16:11:09.465Z","etag":null,"topics":["debugging-tool","electron","electron-app"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tintinweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-27T18:49:40.000Z","updated_at":"2025-03-26T10:04:07.000Z","dependencies_parsed_at":"2024-10-22T09:09:47.543Z","dependency_job_id":"1048a8f2-fe7e-4b91-bf4b-de62417fb4de","html_url":"https://github.com/tintinweb/electron-inject","commit_stats":{"total_commits":26,"total_committers":3,"mean_commits":8.666666666666666,"dds":0.3846153846153846,"last_synced_commit":"e7b4107058f483e93104992a767c02ecd8f6b241"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Felectron-inject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Felectron-inject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Felectron-inject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Felectron-inject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tintinweb","download_url":"https://codeload.github.com/tintinweb/electron-inject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217222,"owners_count":20903009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging-tool","electron","electron-app"],"created_at":"2024-08-02T18:01:04.509Z","updated_at":"2025-04-04T17:11:03.213Z","avatar_url":"https://github.com/tintinweb.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# 💉 electron-inject\n\nYou find yourself locked out of closed source electron applications with no easy way to enable developer tools? ↷ *electron-inject* is here to help 👲\n\n\n*electron-inject* is an application wrapper that utilizes the remote debug console to inject javascript code into electron based applications. For example, this can be pretty handy to enable otherwise unavailable features like the built-in developer console.\n\n![slack](https://cloud.githubusercontent.com/assets/2865694/24376228/70b2c2b0-133b-11e7-893c-c7a0ad262343.gif)\n\n\n# install\n\n    $ pip install electron-inject\n    \nor \n\n    $ python setup.py install\n    \n# usage\n\n    $ python -m electron_inject --help\n    Usage:\n        usage:\n               electron_inject [options] - \u003celectron application\u003e\n\n        example:\n               electron_inject --enable-devtools-hotkeys - /path/to/electron/powered/application [--app-params app-args]\n\n\n    Options:\n      -h, --help            show this help message and exit\n      -d, --enable-devtools-hotkeys\n                            Enable Hotkeys F12 (Toggle Developer Tools) and F5\n                            (Refresh) [default: False]\n      -b, --browser         Launch Devtools in default browser. [default: False]\n      -t TIMEOUT, --timeout=TIMEOUT\n                            Try hard to inject for the time specified [default:\n                            none]\n      -r RENDER_SCRIPTS, --render-script=RENDER_SCRIPTS\n                            Add a script to be injected into each window (render\n                            thread)\n\n# Showcase\n\nInject hotkeys *F12:toggle devconsole* and *F5:reload* into closed source apps with devconsole disabled.\n\n`--enable-devtools-hotkeys` .. enable developer hotkeys\n`--timeout=xx` .. patch all known remote webContent/windows in a timeframe of `xx` seconds. set this to an arbitrary high value to make sure we're patching all future windows.\n\n## whatsapp\n\n`$ python -m electron_inject -d -t 60 - \\\\PATH\\TO\\Local\\WhatsApp\\app-0.2.2244\\WhatsApp.exe`\n\n![whatsapp gif](https://cloud.githubusercontent.com/assets/2865694/24376256/81d44e88-133b-11e7-961f-060e7b8201ed.gif)\n\nIf this gives you an error try launching it with the alternative browser method:\n\n`$ python -m electron_inject --browser - \\PATH\\TO\\Local\\WhatsApp\\app-0.2.2244\\WhatsApp.exe`\n\n## slack\n\n`$ python -m electron_inject -d -t 60 - \\\\PATH\\TO\\Local\\slack\\app-2.5.2\\slack.exe`\n\n![slack](https://cloud.githubusercontent.com/assets/2865694/24376228/70b2c2b0-133b-11e7-893c-c7a0ad262343.gif)\n\n# Render Scripts\n\nPassing the -r file parameter allows to pass a list of scripts to be injected into the render thread. It does not follow imports, just evaluate the text\n\n`python -m electron_inject -r ./test.js -r ~/test2.js -r /usr/bin/test3.js - /opt/electron-api-demos/Electron\\ API\\ Demos`\n\n# Acknowledgments\n\n- [NathanPB](https://github.com/NathanPB) - #7\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftintinweb%2Felectron-inject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftintinweb%2Felectron-inject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftintinweb%2Felectron-inject/lists"}