Open Julix91 opened 5 years ago
Hi Julix, did you ever find a solution to this? I would loooove to be able to open an incognito browser from browser-sync.
I never did get around to fixing it and making a PR, but I think that's what the solutions would have to be. Parse the input and pass it along. Guess if there's malicious parameters that I don't know about then that might introduce some amount of risk, so not sure if a dictionary of acceptable parameters or such is needed. I'd assume not?
My main reason for wanting it is for local Wordpress development. The malicious parameters are over my head from a technical standpoint. :) Thanks for the response!
Issue details
I'd like to open various browsers with parameters (to specify size and position).
opn (which is used in openBrowser function) supports passing arguments
But BrowserSync's code doesn't parse them anywhere as far as I can tell. For now I shall deactivate BrowserSync's opening and see if I can implement it by calling opn myself, but I think it would be quite easy to include some parsing for
--
or-
(with space in front). Maybe I'll give it a try and if I find it might submit pull request for it.The idea would be to set option to
browser: [ 'google chrome --incognito --...', 'firefox -private-window', etc]