mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 09:35:15 +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:
committed by
Andreas Kling
parent
aab99d5945
commit
bc9cd55da4
@@ -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&)
|
||||
|
||||
Reference in New Issue
Block a user