mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
Browser: Support opening a URL from the command line at startup
This commit is contained in:
parent
c4da2a49a5
commit
15a016d3e3
Notes:
sideshowbarker
2024-07-19 11:47:44 +09:00
Author: https://github.com/deoxxa Commit: https://github.com/SerenityOS/serenity/commit/15a016d3e3c Pull-request: https://github.com/SerenityOS/serenity/pull/633
@ -94,7 +94,12 @@ int main(int argc, char** argv)
|
||||
window->set_main_widget(widget);
|
||||
window->show();
|
||||
|
||||
html_widget->load("file:///home/anon/www/welcome.html");
|
||||
String url_to_load = "file:///home/anon/www/welcome.html";
|
||||
|
||||
if (app.args().size() >= 1)
|
||||
url_to_load = app.args()[0];
|
||||
|
||||
html_widget->load(url_to_load);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user