diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-10-22 20:39:43 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-10-22 20:42:21 +0100 |
commit | 6b846c363ddd694bf32ac7e18f0316f4f2663e1b (patch) | |
tree | b4a7628819ab8e66b364b9de2bbb09dcd48b48f2 /content/fetchers/about.c | |
parent | dc5deb26b1dbc8936d311ddfa51c8ddab122dbda (diff) | |
download | netsurf-6b846c363ddd694bf32ac7e18f0316f4f2663e1b.tar.gz netsurf-6b846c363ddd694bf32ac7e18f0316f4f2663e1b.tar.bz2 |
Add trivial maps facilitator at about:maps
This is a simple HTML front end for the Google Static Maps API, since
we don't yet have enough JS support for the full Google Maps.
See:
https://developers.google.com/maps/documentation/staticmaps/
Diffstat (limited to 'content/fetchers/about.c')
-rw-r--r-- | content/fetchers/about.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c index 18528cda7..eeea3d992 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -572,6 +572,21 @@ static bool fetch_about_welcome_handler(struct fetch_about_context *ctx) return true; } +static bool fetch_about_maps_handler(struct fetch_about_context *ctx) +{ + fetch_msg msg; + + /* content is going to return redirect */ + fetch_set_http_code(ctx->fetchh, 302); + + msg.type = FETCH_REDIRECT; + msg.data.redirect = "resource:maps.html"; + + fetch_about_send_callback(&msg, ctx); + + return true; +} + /* Forward declaration because this handler requires the handler table. */ static bool fetch_about_about_handler(struct fetch_about_context *ctx); @@ -593,6 +608,8 @@ struct about_handlers about_handler_list[] = { fetch_about_licence_handler, true }, { "welcome", SLEN("welcome"), NULL, fetch_about_welcome_handler, false }, + { "maps", SLEN("maps"), NULL, + fetch_about_maps_handler, false }, { "config", SLEN("config"), NULL, fetch_about_config_handler, false }, { "Choices", SLEN("Choices"), NULL, |