Skip to content
This repository was archived by the owner on Dec 25, 2022. It is now read-only.

Commit f570c5b

Browse files
IdanHotrflynn89
authored andcommitted
Add block pop-ups checkbox to debug menu
1 parent e523b00 commit f570c5b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

BrowserWindow.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ BrowserWindow::BrowserWindow(int webdriver_fd_passing_socket)
248248
debug_request("scripting", state ? "on" : "off");
249249
});
250250

251+
auto* block_pop_ups_action = new QAction("Block Pop-ups", this);
252+
block_pop_ups_action->setCheckable(true);
253+
block_pop_ups_action->setChecked(true);
254+
debug_menu->addAction(block_pop_ups_action);
255+
QObject::connect(block_pop_ups_action, &QAction::triggered, this, [this, block_pop_ups_action] {
256+
bool state = block_pop_ups_action->isChecked();
257+
debug_request("block-pop-ups", state ? "on" : "off");
258+
});
259+
251260
auto* enable_same_origin_policy_action = new QAction("Enable Same-Origin Policy", this);
252261
enable_same_origin_policy_action->setCheckable(true);
253262
debug_menu->addAction(enable_same_origin_policy_action);

0 commit comments

Comments
 (0)