1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +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:
Idan Horowitz 2021-04-14 15:13:51 +03:00 committed by Andreas Kling
parent aab99d5945
commit bc9cd55da4
5 changed files with 59 additions and 1 deletions

View file

@ -28,6 +28,7 @@
#include "History.h"
#include <AK/URL.h>
#include <LibGUI/ActionGroup.h>
#include <LibGUI/Widget.h>
#include <LibGfx/ShareableBitmap.h>
#include <LibHTTP/HttpJob.h>
@ -115,6 +116,9 @@ private:
Gfx::ShareableBitmap m_image_context_menu_bitmap;
URL m_image_context_menu_url;
GUI::ActionGroup m_user_agent_spoof_actions;
RefPtr<GUI::Action> m_disable_user_agent_spoofing;
RefPtr<GUI::Menu> m_tab_context_menu;
RefPtr<GUI::Menu> m_page_context_menu;