Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrome hack on windows using php - fix and more robust #735

Merged
merged 2 commits into from
Mar 2, 2020

Conversation

kensoh
Copy link
Member

@kensoh kensoh commented Feb 20, 2020

Draft PR to be validated

@kensoh
Copy link
Member Author

kensoh commented Feb 21, 2020

To use following instead, somehow double quotes is required to enclose the PHP commands.

rem hack chrome to prevent ended unexpectedly message
set "chrome_pref=chrome\tagui_user_profile\Default\Preferences"
if exist "%chrome_pref%" (
	php -q -r "file_put_contents('%chrome_pref%',str_replace('\"exited_cleanly\":false','\"exited_cleanly\":true',file_get_contents('%chrome_pref%')));" > nul 2>&1
	php -q -r "file_put_contents('%chrome_pref%',str_replace('\"exit_type\":\"Crashed\"','\"exit_type\":\"Normal\"',file_get_contents('%chrome_pref%')));" > nul 2>&1
)

@kensoh
Copy link
Member Author

kensoh commented Feb 21, 2020

Thanks @siowyisheng for merging the other 2 PRs!

This PR I'm comfortable for you to review and test. Looks good to be finally able to hack Chrome to get rid of the irritating popup message. Also this is on tagui_user_profile, no impact to user's own Chrome preferences.

@siowyisheng
Copy link
Contributor

will test this thanks!!!

@kensoh
Copy link
Member Author

kensoh commented Feb 21, 2020

Thanks! Finally can get rid of this irritating popup.

@siowyisheng
Copy link
Contributor

Tested and working consistently.

@siowyisheng siowyisheng merged commit 5e719c0 into develop Mar 2, 2020
@kensoh kensoh deleted the chrome_hack_using_php branch March 2, 2020 09:10
siowyisheng pushed a commit that referenced this pull request Mar 10, 2020
* chrome hack on windows using php

* change quotation marks used to work on Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants