gildas-lormeau / single-file-cli

CLI tool for saving a faithful copy of a complete web page in a single HTML file (based on SingleFile)
GNU Affero General Public License v3.0
539 stars 57 forks source link

Ability to provide mobileEmulation option to browser #89

Closed ym-rgalimov closed 1 month ago

ym-rgalimov commented 1 month ago

Hey team,

I really appreciate your work, you did a great job. But I'm struggling to pass the mobileEmulation experimental option to the single-file-cli.

In fact, it would be great if we could pass the path to a JSON file which contains ChromeDriver options that should override defaults.

Something like that:

"mobileEmulation": {
  "deviceName":  "iPhone X"
}

UPD: I found that you don't use ChromeDriver and communicate with browser over CDP. I have created a PR #90 to enable mobile emulation.