mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
Browser: Open links in a new tab when middle clicked
This commit is contained in:
parent
0e048f3c4c
commit
8182a709e3
Notes:
sideshowbarker
2024-07-19 06:55:36 +09:00
Author: https://github.com/FalseHonesty
Commit: 8182a709e3
Pull-request: https://github.com/SerenityOS/serenity/pull/2137
1 changed files with 4 additions and 0 deletions
|
@ -165,6 +165,10 @@ Tab::Tab()
|
||||||
m_link_context_menu->popup(screen_position);
|
m_link_context_menu->popup(screen_position);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
m_html_widget->on_link_middle_click = [this](auto& href) {
|
||||||
|
m_html_widget->on_link_click(href, "_blank", 0);
|
||||||
|
};
|
||||||
|
|
||||||
m_html_widget->on_title_change = [this](auto& title) {
|
m_html_widget->on_title_change = [this](auto& title) {
|
||||||
if (title.is_null()) {
|
if (title.is_null()) {
|
||||||
m_title = m_html_widget->main_frame().document()->url().to_string();
|
m_title = m_html_widget->main_frame().document()->url().to_string();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue