mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
Ladybird: Add block pop-ups checkbox to debug menu
This commit is contained in:
parent
948c4ba102
commit
fad3fbfe26
1 changed files with 9 additions and 0 deletions
|
@ -248,6 +248,15 @@ BrowserWindow::BrowserWindow(int webdriver_fd_passing_socket)
|
||||||
debug_request("scripting", state ? "on" : "off");
|
debug_request("scripting", state ? "on" : "off");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
auto* block_pop_ups_action = new QAction("Block Pop-ups", this);
|
||||||
|
block_pop_ups_action->setCheckable(true);
|
||||||
|
block_pop_ups_action->setChecked(true);
|
||||||
|
debug_menu->addAction(block_pop_ups_action);
|
||||||
|
QObject::connect(block_pop_ups_action, &QAction::triggered, this, [this, block_pop_ups_action] {
|
||||||
|
bool state = block_pop_ups_action->isChecked();
|
||||||
|
debug_request("block-pop-ups", state ? "on" : "off");
|
||||||
|
});
|
||||||
|
|
||||||
auto* enable_same_origin_policy_action = new QAction("Enable Same-Origin Policy", this);
|
auto* enable_same_origin_policy_action = new QAction("Enable Same-Origin Policy", this);
|
||||||
enable_same_origin_policy_action->setCheckable(true);
|
enable_same_origin_policy_action->setCheckable(true);
|
||||||
debug_menu->addAction(enable_same_origin_policy_action);
|
debug_menu->addAction(enable_same_origin_policy_action);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue