1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

Browser: Call url_from_user_input for home URL

This allows omitting HTTP scheme in home URLs.
This commit is contained in:
Maciej 2022-01-31 21:14:19 +01:00 committed by Andreas Kling
parent 5d8cda59ae
commit d3fc3337ef
2 changed files with 3 additions and 3 deletions

View file

@ -102,7 +102,7 @@ BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url)
};
m_window_actions.on_create_new_tab = [this] {
create_new_tab(Browser::g_home_url, true);
create_new_tab(Browser::url_from_user_input(Browser::g_home_url), true);
};
m_window_actions.on_next_tab = [this] {
@ -171,7 +171,7 @@ void BrowserWindow::build_menus()
m_go_back_action = GUI::CommonActions::make_go_back_action([this](auto&) { active_tab().go_back(); }, this);
m_go_forward_action = GUI::CommonActions::make_go_forward_action([this](auto&) { active_tab().go_forward(); }, this);
m_go_home_action = GUI::CommonActions::make_go_home_action([this](auto&) { active_tab().load(g_home_url); }, this);
m_go_home_action = GUI::CommonActions::make_go_home_action([this](auto&) { active_tab().load(Browser::url_from_user_input(g_home_url)); }, this);
m_go_home_action->set_status_tip("Go to home page");
m_reload_action = GUI::CommonActions::make_reload_action([this](auto&) { active_tab().reload(); }, this);
m_reload_action->set_status_tip("Reload current page");