[epiphany/pgriffis/web-extension/browserinfo] WebExtensions: Add more data to runtime.getBrowserInfo()




commit 399cd5ffd8783f2970f653e4bed4647225e6a7f0
Author: Patrick Griffis <pgriffis igalia com>
Date:   Wed Jun 8 13:17:20 2022 -0500

    WebExtensions: Add more data to runtime.getBrowserInfo()
    
    It is useful to have the version numbers and 'Epiphany' is a more
    simple name.
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1138>

 meson.build                    | 1 +
 src/webextension/api/runtime.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 05b0ebfc5..4d93ab82b 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,7 @@ else
 endif
 conf.set('EPHY_MICRO_VERSION', 0)
 
+conf.set_quoted('EPHY_VERSION', meson.project_version())
 conf.set_quoted('VERSION', '@VCS_TAG@')
 
 gsb_api_key = get_option('gsb_api_key')
diff --git a/src/webextension/api/runtime.c b/src/webextension/api/runtime.c
index fee77464f..3d1760cf8 100644
--- a/src/webextension/api/runtime.c
+++ b/src/webextension/api/runtime.c
@@ -39,7 +39,11 @@ runtime_handler_get_browser_info (EphyWebExtension  *self,
 
   json_builder_begin_object (builder);
   json_builder_set_member_name (builder, "name");
-  json_builder_add_string_value (builder, "GNOME Web (Epiphany)");
+  json_builder_add_string_value (builder, "Epiphany");
+  json_builder_set_member_name (builder, "version");
+  json_builder_add_string_value (builder, EPHY_VERSION);
+  json_builder_set_member_name (builder, "vendor");
+  json_builder_add_string_value (builder, "GNOME");
   json_builder_end_object (builder);
 
   root = json_builder_get_root (builder);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]