summaryrefslogtreecommitdiff
path: root/Applications/Browser
diff options
context:
space:
mode:
authorConrad Pankoff <deoxxa@fknsrs.biz>2019-10-06 22:43:10 +1100
committerAndreas Kling <awesomekling@gmail.com>2019-10-06 14:25:58 +0200
commit15a016d3e3ccbfd9ef0afd46c0b175c00bfe318e (patch)
treedb9eda65be4110abe28832f568a115d0a23efe55 /Applications/Browser
parentc4da2a49a5b4bbba7d4da9a32daf6a00f8bf885c (diff)
downloadserenity-15a016d3e3ccbfd9ef0afd46c0b175c00bfe318e.zip
Browser: Support opening a URL from the command line at startup
Diffstat (limited to 'Applications/Browser')
-rw-r--r--Applications/Browser/main.cpp7
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();
}