summaryrefslogtreecommitdiff
path: root/Userland/Applications/Browser
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-11-15 02:01:13 +0200
committerLinus Groh <mail@linusgroh.de>2022-11-15 21:48:19 +0000
commit798d7c6fae3396b79f24bb98da4d959509b48102 (patch)
tree576bd21e343461c2f28d95917883a6d0afd39c8c /Userland/Applications/Browser
parentff2f31bc81df4505209be7fdb46d770b6f6e2098 (diff)
downloadserenity-798d7c6fae3396b79f24bb98da4d959509b48102.zip
LibWeb: Add 'should block pop ups' user config to Page
This will also be used by the window.open algorithm steps.
Diffstat (limited to 'Userland/Applications/Browser')
-rw-r--r--Userland/Applications/Browser/BrowserWindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp
index eb7c25064c..69d596be80 100644
--- a/Userland/Applications/Browser/BrowserWindow.cpp
+++ b/Userland/Applications/Browser/BrowserWindow.cpp
@@ -430,6 +430,14 @@ void BrowserWindow::build_menus()
scripting_enabled_action->set_checked(true);
debug_menu.add_action(scripting_enabled_action);
+ auto block_pop_ups_action = GUI::Action::create_checkable(
+ "Block Pop-ups", [this](auto& action) {
+ active_tab().view().debug_request("block-pop-ups", action.is_checked() ? "on" : "off");
+ },
+ this);
+ block_pop_ups_action->set_checked(true);
+ debug_menu.add_action(block_pop_ups_action);
+
auto same_origin_policy_action = GUI::Action::create_checkable(
"Enable Same Origin &Policy", [this](auto& action) {
active_tab().view().debug_request("same-origin-policy", action.is_checked() ? "on" : "off");