mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:25:08 +00:00
Browser+LibWeb: Add support for spoofing the browser user agent
This is helpful when testing certain sites like twitter.com which display differently based on the user agent.
This commit is contained in:
parent
aab99d5945
commit
bc9cd55da4
5 changed files with 59 additions and 1 deletions
|
@ -220,6 +220,10 @@ void ClientConnection::handle(const Messages::WebContentServer::DebugRequest& me
|
|||
if (message.request() == "clear-cache") {
|
||||
Web::ResourceLoader::the().clear_cache();
|
||||
}
|
||||
|
||||
if (message.request() == "spoof-user-agent") {
|
||||
Web::ResourceLoader::the().set_user_agent(message.argument());
|
||||
}
|
||||
}
|
||||
|
||||
void ClientConnection::handle(const Messages::WebContentServer::GetSource&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue