mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +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
Notes:
sideshowbarker
2024-07-17 04:26:34 +09:00
Author: https://github.com/IdanHo
Commit: 798d7c6fae
Pull-request: https://github.com/SerenityOS/serenity/pull/16072
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/trflynn89
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