mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
Browser: Call url_from_user_input for home URL
This allows omitting HTTP scheme in home URLs.
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -92,7 +92,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
|
||||
TRY(load_content_filters());
|
||||
|
||||
URL first_url = Browser::g_home_url;
|
||||
URL first_url = Browser::url_from_user_input(Browser::g_home_url);
|
||||
if (specified_url) {
|
||||
if (Core::File::exists(specified_url)) {
|
||||
first_url = URL::create_with_file_protocol(Core::File::real_path_for(specified_url));
|
||||
|
||||
Reference in New Issue
Block a user