diff options
author | Conrad Pankoff <deoxxa@fknsrs.biz> | 2019-10-06 22:43:10 +1100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-06 14:25:58 +0200 |
commit | 15a016d3e3ccbfd9ef0afd46c0b175c00bfe318e (patch) | |
tree | db9eda65be4110abe28832f568a115d0a23efe55 /Applications/Browser | |
parent | c4da2a49a5b4bbba7d4da9a32daf6a00f8bf885c (diff) | |
download | serenity-15a016d3e3ccbfd9ef0afd46c0b175c00bfe318e.zip |
Browser: Support opening a URL from the command line at startup
Diffstat (limited to 'Applications/Browser')
-rw-r--r-- | Applications/Browser/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp index 23e53f794f..aef4e98e20 100644 --- a/Applications/Browser/main.cpp +++ b/Applications/Browser/main.cpp @@ -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(); } |