Skip to content

Commit

Permalink
web runner: custom user-agent
Browse files Browse the repository at this point in the history
Requires web-runner 0.0.14 or higher
  • Loading branch information
daniel-j authored Aug 21, 2020
1 parent edabfe9 commit 65b0b7f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lutris/runners/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ class web(Runner):
"default": False,
"help": _("Enable Adobe Flash Player."),
},
{
"option": "user_agent",
"label": _("Custom User-Agent"),
"type": "string",
"default": "",
"help": _("Overrides the default User-Agent header used by the runner."),
"advanced": True,
},
{
"option": "devtools",
"label": _("Debug with Developer Tools"),
Expand Down Expand Up @@ -248,5 +256,8 @@ def play(self):
if self.runner_config.get("window_size"):
command.append("--window-size")
command.append(self.runner_config.get("window_size"))
if self.runner_config.get("user_agent"):
command.append("--user-agent")
command.append(self.runner_config.get("user_agent"))

return {"command": command, "env": self.get_env(False)}

0 comments on commit 65b0b7f

Please sign in to comment.