Ceiridge / Chrome-Developer-Mode-Extension-Warning-Patcher

⇒ Disable Chrome's Developer Mode Extension Warning Popup & Elision & Manifest V3 webRequestBlocking limitations
GNU General Public License v3.0
447 stars 34 forks source link

Invert Console Logic to be more user friendly #91

Closed JustArion closed 1 year ago

JustArion commented 1 year ago

This PR inverts the ChromeDllInjector Console Logic by Creating a Console via Kernel32.AllocConsole(); instead of Destroying the current Console session if the build is not Debug.

Why though?

When the program runs on Startup the Console is briefly seen which is unnecessary.

What's Changed?

Ceiridge commented 1 year ago

Very great! I have also been thinking about this. Have you tried whether you can start it with command line arguments and still get the output text in the command prompt you have started it in, meaning that no additional command prompt launches, where you can only shortly see the text output? Because this is the reason why I chose to make it a console application, but if this is not an issue (anymore), I can merge it.

JustArion commented 1 year ago

I haven't tested with command line arguments yet, but I have tested baseline functionality for Debug and Release modes and they work fine. I'll update the reply with an answer in a few minutes if an additional console is spawned or not.

Edit: No additional console is spawned. It attaches to the parent and sets the output to the parent instance perfectly fine. Text is also output successfully to the parent (if any) or in the case that there is no parent, text is successfully output to the newly created console.

Ceiridge commented 1 year ago

I have just noticed that the change is for the injector and not the GUI, so there are no command line options anyway. This is good.