mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
LibWeb: Add 'should block pop ups' user config to Page
This will also be used by the window.open algorithm steps.
This commit is contained in:
parent
ff2f31bc81
commit
798d7c6fae
3 changed files with 17 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue